@lumenflow/cli 4.24.0 → 5.0.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 +54 -52
- package/dist/agent-issues-query.js +10 -2
- package/dist/agent-issues-query.js.map +1 -1
- package/dist/agent-runtime-enrollment-events.js +44 -0
- package/dist/agent-runtime-enrollment-events.js.map +1 -0
- package/dist/agent-session-end.js +47 -0
- package/dist/agent-session-end.js.map +1 -1
- package/dist/agent-session-heartbeat.js +250 -0
- package/dist/agent-session-heartbeat.js.map +1 -0
- package/dist/agent-session.js +299 -5
- package/dist/agent-session.js.map +1 -1
- package/dist/capacity-snapshot-emitter.js +73 -0
- package/dist/capacity-snapshot-emitter.js.map +1 -0
- package/dist/claim-queue.js +276 -0
- package/dist/claim-queue.js.map +1 -0
- package/dist/config-set.js +22 -3
- package/dist/config-set.js.map +1 -1
- package/dist/control-plane-sidecar-runner.js +145 -0
- package/dist/control-plane-sidecar-runner.js.map +1 -0
- package/dist/delegation-list.js +160 -1
- package/dist/delegation-list.js.map +1 -1
- package/dist/delegation-role-resolver.js +69 -0
- package/dist/delegation-role-resolver.js.map +1 -0
- package/dist/docs-generate-pack-reference.js +500 -0
- package/dist/docs-generate-pack-reference.js.map +1 -0
- package/dist/docs-sync.js +116 -1
- package/dist/docs-sync.js.map +1 -1
- package/dist/file-edit.js +28 -8
- package/dist/file-edit.js.map +1 -1
- package/dist/file-write.js +29 -5
- package/dist/file-write.js.map +1 -1
- package/dist/gate-co-change.js +25 -7
- package/dist/gate-co-change.js.map +1 -1
- package/dist/gate-conditional.js +19 -7
- package/dist/gate-conditional.js.map +1 -1
- package/dist/gates-runners.js +42 -33
- package/dist/gates-runners.js.map +1 -1
- package/dist/gates-utils.js +34 -20
- package/dist/gates-utils.js.map +1 -1
- package/dist/gates.js +79 -7
- package/dist/gates.js.map +1 -1
- package/dist/hooks/config-resolver.js +10 -1
- package/dist/hooks/config-resolver.js.map +1 -1
- package/dist/init-package-config.js +1 -1
- package/dist/init-package-config.js.map +1 -1
- package/dist/init-scaffolding.js +5 -1
- package/dist/init-scaffolding.js.map +1 -1
- package/dist/init-templates.js +10 -0
- package/dist/init-templates.js.map +1 -1
- package/dist/init.js +1 -1
- package/dist/init.js.map +1 -1
- package/dist/initiative-create.js +17 -0
- package/dist/initiative-create.js.map +1 -1
- package/dist/initiative-remove-wu.js +17 -3
- package/dist/initiative-remove-wu.js.map +1 -1
- package/dist/kernel-event-sync/emitters.js +104 -0
- package/dist/kernel-event-sync/emitters.js.map +1 -0
- package/dist/kernel-event-sync/index.js +13 -0
- package/dist/kernel-event-sync/index.js.map +1 -0
- package/dist/kernel-event-sync/lifecycle-emitters.js +160 -0
- package/dist/kernel-event-sync/lifecycle-emitters.js.map +1 -0
- package/dist/kernel-event-sync/narrow-emissions.js +89 -0
- package/dist/kernel-event-sync/narrow-emissions.js.map +1 -0
- package/dist/kernel-event-sync/software-delivery-emitters.js +297 -0
- package/dist/kernel-event-sync/software-delivery-emitters.js.map +1 -0
- package/dist/lane-lock.js +14 -1
- package/dist/lane-lock.js.map +1 -1
- package/dist/lane-suggest.js +21 -0
- package/dist/lane-suggest.js.map +1 -1
- package/dist/lumenflow-upgrade.js +7 -5
- package/dist/lumenflow-upgrade.js.map +1 -1
- package/dist/mem-context.js +145 -0
- package/dist/mem-context.js.map +1 -1
- package/dist/mem-create.js +39 -6
- package/dist/mem-create.js.map +1 -1
- package/dist/mem-inbox.js +16 -0
- package/dist/mem-inbox.js.map +1 -1
- package/dist/mem-roster.js +95 -0
- package/dist/mem-roster.js.map +1 -0
- package/dist/mem-signal.js +97 -2
- package/dist/mem-signal.js.map +1 -1
- package/dist/metrics-snapshot.js +3 -2
- package/dist/metrics-snapshot.js.map +1 -1
- package/dist/orchestrate-init-status.js +117 -2
- package/dist/orchestrate-init-status.js.map +1 -1
- package/dist/orchestrate-initiative.js +83 -10
- package/dist/orchestrate-initiative.js.map +1 -1
- package/dist/orchestrate-monitor-quality.js +289 -0
- package/dist/orchestrate-monitor-quality.js.map +1 -0
- package/dist/orchestrate-monitor.js +85 -0
- package/dist/orchestrate-monitor.js.map +1 -1
- package/dist/pack-validate.js +127 -2
- package/dist/pack-validate.js.map +1 -1
- package/dist/plan-create.js +18 -0
- package/dist/plan-create.js.map +1 -1
- package/dist/plan-link.js +13 -0
- package/dist/plan-link.js.map +1 -1
- package/dist/plan-promote.js +14 -0
- package/dist/plan-promote.js.map +1 -1
- package/dist/pre-commit-check.js +4 -3
- package/dist/pre-commit-check.js.map +1 -1
- package/dist/public-manifest.js +17 -3
- package/dist/public-manifest.js.map +1 -1
- package/dist/release.js +10 -10
- package/dist/release.js.map +1 -1
- package/dist/session-cross-link.js +139 -0
- package/dist/session-cross-link.js.map +1 -0
- package/dist/sidecar-manager.js +208 -0
- package/dist/sidecar-manager.js.map +1 -0
- package/dist/state-path-resolvers.js +18 -0
- package/dist/state-path-resolvers.js.map +1 -1
- package/dist/stream-heartbeat.js +151 -0
- package/dist/stream-heartbeat.js.map +1 -0
- package/dist/sync-templates.js +56 -2
- package/dist/sync-templates.js.map +1 -1
- package/dist/wu-block.js +47 -5
- package/dist/wu-block.js.map +1 -1
- package/dist/wu-claim-branch.js +8 -4
- package/dist/wu-claim-branch.js.map +1 -1
- package/dist/wu-claim-state.js +5 -3
- package/dist/wu-claim-state.js.map +1 -1
- package/dist/wu-claim-worktree.js +5 -3
- package/dist/wu-claim-worktree.js.map +1 -1
- package/dist/wu-claim.js +261 -9
- package/dist/wu-claim.js.map +1 -1
- package/dist/wu-done-auto-cleanup.js +3 -2
- package/dist/wu-done-auto-cleanup.js.map +1 -1
- package/dist/wu-done-git-ops.js +12 -8
- package/dist/wu-done-git-ops.js.map +1 -1
- package/dist/wu-done-preflight.js +3 -3
- package/dist/wu-done-preflight.js.map +1 -1
- package/dist/wu-done.js +46 -10
- package/dist/wu-done.js.map +1 -1
- package/dist/wu-lifecycle-sync/gate-scope-resolver.js +16 -0
- package/dist/wu-lifecycle-sync/gate-scope-resolver.js.map +1 -0
- package/dist/wu-lifecycle-sync/kernel-event-sync-shim.js +10 -0
- package/dist/wu-lifecycle-sync/kernel-event-sync-shim.js.map +1 -0
- package/dist/wu-prep.js +363 -22
- package/dist/wu-prep.js.map +1 -1
- package/dist/wu-prune.js +68 -27
- package/dist/wu-prune.js.map +1 -1
- package/dist/wu-release.js +34 -3
- package/dist/wu-release.js.map +1 -1
- package/dist/wu-review.js +167 -0
- package/dist/wu-review.js.map +1 -0
- package/dist/wu-spawn-prompt-builders.js +296 -40
- package/dist/wu-spawn-prompt-builders.js.map +1 -1
- package/dist/wu-spawn-strategy-resolver.js +126 -14
- package/dist/wu-spawn-strategy-resolver.js.map +1 -1
- package/dist/wu-unblock.js +52 -22
- package/dist/wu-unblock.js.map +1 -1
- package/package.json +13 -8
- package/packs/agent-runtime/.turbo/turbo-build.log +1 -1
- package/packs/agent-runtime/.turbo/turbo-test.log +25 -0
- package/packs/agent-runtime/.turbo/turbo-typecheck.log +4 -0
- package/packs/agent-runtime/agent-heartbeat.ts +163 -0
- package/packs/agent-runtime/auto-session-integration.ts +874 -0
- package/packs/agent-runtime/delegation-registry-schema.ts +220 -0
- package/packs/agent-runtime/delegation-registry-store.ts +269 -0
- package/packs/agent-runtime/delegation-tree.ts +328 -0
- package/packs/agent-runtime/index.ts +9 -0
- package/packs/agent-runtime/manifest.ts +103 -19
- package/packs/agent-runtime/manifest.yaml +132 -0
- package/packs/agent-runtime/memory-coordination-contract.ts +86 -0
- package/packs/agent-runtime/memory.d.ts +19 -0
- package/packs/agent-runtime/orchestration.ts +238 -23
- package/packs/agent-runtime/package.json +11 -2
- package/packs/agent-runtime/remote-controls/index.ts +7 -0
- package/packs/agent-runtime/remote-controls/operations.ts +399 -0
- package/packs/agent-runtime/remote-controls/port.ts +48 -0
- package/packs/agent-runtime/remote-controls/state-store.ts +258 -0
- package/packs/agent-runtime/remote-controls/types.ts +105 -0
- package/packs/agent-runtime/session-schema.ts +423 -0
- package/packs/agent-runtime/tool-impl/index.ts +1 -0
- package/packs/agent-runtime/tool-impl/remote-controls.mock.ts +252 -0
- package/packs/agent-runtime/tool-impl/remote-controls.ts +273 -0
- package/packs/agent-runtime/tsconfig.json +1 -1
- package/packs/agent-runtime/turn-lifecycle-events.ts +501 -0
- package/packs/sidekick/.lumenflow/state/conductor/outbox/sidekick-events.jsonl +213 -0
- package/packs/sidekick/.turbo/turbo-build.log +1 -1
- package/packs/sidekick/.turbo/turbo-test.log +25 -0
- package/packs/sidekick/.turbo/turbo-typecheck.log +4 -0
- package/packs/sidekick/channel-ingress.ts +137 -0
- package/packs/sidekick/manifest.ts +74 -0
- package/packs/sidekick/manifest.yaml +88 -0
- package/packs/sidekick/package.json +3 -1
- package/packs/sidekick/sidekick-events.ts +517 -0
- package/packs/sidekick/src/adapters/cloud-queue.ts +101 -0
- package/packs/sidekick/src/adapters/control-plane-bridge.adapter.ts +378 -0
- package/packs/sidekick/src/adapters/filesystem-bridge.adapter.ts +224 -0
- package/packs/sidekick/src/domain/channel.types.ts +84 -0
- package/packs/sidekick/src/ports/channel-bridge.port.ts +75 -0
- package/packs/sidekick/src/routines/commit.ts +74 -0
- package/packs/sidekick/tool-impl/channel-tools.ts +47 -0
- package/packs/sidekick/tool-impl/memory-tools.ts +17 -0
- package/packs/sidekick/tool-impl/routine-commit.ts +102 -0
- package/packs/sidekick/tool-impl/routine-tools.ts +67 -7
- package/packs/sidekick/tool-impl/runtime-context.ts +4 -0
- package/packs/sidekick/tool-impl/storage.ts +3 -0
- package/packs/sidekick/tool-impl/system-tools.ts +7 -0
- package/packs/sidekick/tool-impl/task-tools.ts +46 -0
- package/packs/sidekick/tsconfig.json +1 -1
- package/packs/software-delivery/.turbo/turbo-build.log +1 -1
- package/packs/software-delivery/.turbo/turbo-test.log +63 -0
- package/packs/software-delivery/.turbo/turbo-typecheck.log +4 -0
- package/packs/software-delivery/manifest-schema.ts +30 -0
- package/packs/software-delivery/manifest.ts +99 -1
- package/packs/software-delivery/manifest.yaml +46 -0
- package/packs/software-delivery/package.json +88 -3
- package/packs/software-delivery/src/commands/index.ts +5 -0
- package/packs/software-delivery/src/config/delivery-review-contract.ts +20 -0
- package/packs/software-delivery/src/config/env-accessors.ts +19 -0
- package/packs/software-delivery/src/config/index.ts +8 -0
- package/packs/software-delivery/src/config/normalize-config-keys.ts +19 -0
- package/packs/software-delivery/src/config/schemas/lumenflow-config-schema-types.ts +436 -0
- package/packs/software-delivery/src/config/workspace-reader.ts +310 -0
- package/packs/software-delivery/src/constants/backlog-patterns.ts +31 -0
- package/packs/software-delivery/src/constants/client-ids.ts +19 -0
- package/packs/software-delivery/src/constants/config-contract.ts +7 -0
- package/packs/software-delivery/src/constants/docs-layout-presets.ts +50 -0
- package/packs/software-delivery/src/constants/duration-constants.ts +20 -0
- package/packs/software-delivery/src/constants/gate-constants.ts +32 -0
- package/packs/software-delivery/src/constants/index.ts +29 -0
- package/packs/software-delivery/src/constants/lock-constants.ts +35 -0
- package/packs/software-delivery/src/constants/object-guards.ts +12 -0
- package/packs/software-delivery/src/constants/section-headings.ts +107 -0
- package/packs/software-delivery/src/constants/wu-cli-constants.ts +485 -0
- package/packs/software-delivery/src/constants/wu-domain-constants.ts +466 -0
- package/packs/software-delivery/src/constants/wu-git-constants.ts +7 -0
- package/packs/software-delivery/src/constants/wu-id-format.ts +327 -0
- package/packs/software-delivery/src/constants/wu-paths-constants.ts +358 -0
- package/packs/software-delivery/src/constants/wu-statuses.ts +287 -0
- package/packs/software-delivery/src/constants/wu-type-helpers.ts +67 -0
- package/packs/software-delivery/src/constants/wu-ui-constants.ts +267 -0
- package/packs/software-delivery/src/constants/wu-validation-constants.ts +73 -0
- package/packs/software-delivery/src/domain/index.ts +5 -0
- package/packs/software-delivery/src/domain/orchestration.constants.ts +168 -0
- package/packs/software-delivery/src/domain/orchestration.schemas.ts +239 -0
- package/packs/software-delivery/src/domain/orchestration.types.ts +178 -0
- package/packs/software-delivery/src/methodology/incremental-test.ts +90 -0
- package/packs/software-delivery/src/methodology/index.ts +6 -0
- package/packs/software-delivery/src/methodology/manual-test-validator.ts +292 -0
- package/packs/software-delivery/src/policy/coverage-gate.ts +270 -0
- package/packs/software-delivery/src/policy/gates-agent-mode.ts +223 -0
- package/packs/software-delivery/src/policy/gates-config-internal.ts +121 -0
- package/packs/software-delivery/src/policy/gates-config.ts +293 -0
- package/packs/software-delivery/src/policy/gates-coverage.ts +247 -0
- package/packs/software-delivery/src/policy/gates-presets.ts +134 -0
- package/packs/software-delivery/src/policy/gates-schemas.ts +173 -0
- package/packs/software-delivery/src/policy/index.ts +22 -0
- package/packs/software-delivery/src/policy/package-manager-resolver.ts +319 -0
- package/packs/software-delivery/src/policy/resolve-policy.ts +518 -0
- package/packs/software-delivery/src/ports/config.ports.ts +90 -0
- package/packs/software-delivery/src/ports/dashboard-renderer.port.ts +125 -0
- package/packs/software-delivery/src/ports/index.ts +10 -0
- package/packs/software-delivery/src/ports/sync-validator.ports.ts +59 -0
- package/packs/software-delivery/src/ports/wu-helpers.ports.ts +168 -0
- package/packs/software-delivery/src/ports/wu-state.ports.ts +241 -0
- package/packs/software-delivery/src/primitives/index.ts +5 -0
- package/packs/software-delivery/src/runtime/index.ts +6 -0
- package/packs/software-delivery/src/runtime/work-classifier.ts +561 -0
- package/packs/software-delivery/src/sandbox/index.ts +10 -0
- package/packs/software-delivery/src/sandbox/sandbox-allowlist.ts +118 -0
- package/packs/software-delivery/src/sandbox/sandbox-backend-linux.ts +88 -0
- package/packs/software-delivery/src/sandbox/sandbox-backend-macos.ts +154 -0
- package/packs/software-delivery/src/sandbox/sandbox-backend-windows.ts +47 -0
- package/packs/software-delivery/src/sandbox/sandbox-profile.ts +153 -0
- package/packs/software-delivery/src/schemas/index.ts +5 -0
- package/packs/software-delivery/src/state/date-utils.ts +158 -0
- package/packs/software-delivery/src/state/index.ts +15 -0
- package/packs/software-delivery/src/state/state-machine.ts +119 -0
- package/packs/software-delivery/src/state/wu-doc-types.ts +51 -0
- package/packs/software-delivery/src/state/wu-paths.ts +381 -0
- package/packs/software-delivery/src/state/wu-schema.ts +1139 -0
- package/packs/software-delivery/src/state/wu-state-schema.ts +255 -0
- package/packs/software-delivery/src/state/wu-yaml.ts +338 -0
- package/packs/software-delivery/src/types.d.ts +16 -0
- package/packs/software-delivery/tool-impl/wu-lifecycle-tools.ts +18 -0
- package/packs/software-delivery/tsconfig.json +28 -2
- package/templates/core/AGENTS.md.template +76 -17
- package/templates/core/LUMENFLOW.md.template +265 -66
- package/templates/core/_frameworks/lumenflow/wu-sizing-guide.md.template +180 -116
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +26 -8
- package/templates/core/ai/onboarding/existing-project-bootstrap.md.template +171 -0
- package/templates/core/ai/onboarding/first-15-mins.md.template +3 -1
- package/templates/core/ai/onboarding/first-wu-mistakes.md.template +1 -1
- package/templates/core/ai/onboarding/initiative-orchestration.md.template +46 -30
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +36 -33
- package/templates/core/ai/onboarding/release-process.md.template +8 -7
- package/templates/core/ai/onboarding/starting-prompt.md.template +2 -0
- package/templates/core/ai/onboarding/troubleshooting-wu-done.md.template +62 -0
- package/templates/vendors/claude/.claude/CLAUDE.md.template +29 -54
- package/templates/vendors/cursor/.cursor/rules/lumenflow.md.template +24 -52
- package/templates/vendors/windsurf/.windsurf/rules/lumenflow.md.template +24 -52
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
|
|
4
|
+
// Pack-local config helpers. Introduced by WU-2686 as Option 1b prep —
|
|
5
|
+
// keeps the pack core-free while exposing a minimal workspace.yaml reader.
|
|
6
|
+
// Extended by WU-2694 with `getConfig(cwd)` + pack-local config schema.
|
|
7
|
+
export * from './workspace-reader.js';
|
|
8
|
+
export * from './schemas/lumenflow-config-schema-types.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Pack-side wrapper for normalize-config-keys (INIT-058 WU-2727).
|
|
6
|
+
*
|
|
7
|
+
* Part of the staged migration pattern: consumers migrate OFF the
|
|
8
|
+
* `@lumenflow/core/normalize-config-keys` subpath and onto
|
|
9
|
+
* `@lumenflow/packs-software-delivery/config/normalize-config-keys` FIRST,
|
|
10
|
+
* while the canonical implementation still lives in `@lumenflow/core`. A
|
|
11
|
+
* follow-up WU will move the canonical file into the pack and update this
|
|
12
|
+
* wrapper to become the canonical definition.
|
|
13
|
+
*
|
|
14
|
+
* This file must re-export DIRECTLY from
|
|
15
|
+
* `@lumenflow/core/normalize-config-keys` (single level). Do NOT introduce a
|
|
16
|
+
* shim chain — WU-2712 hit TS2305 on type-only imports through chained shims.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export * from '@lumenflow/core/normalize-config-keys';
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Pack-local LumenFlow configuration schema (WU-2694).
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the shape of `@lumenflow/core/lumenflow-config-schema` using
|
|
8
|
+
* hand-maintained TypeScript interfaces plus default-value constants. The pack
|
|
9
|
+
* side deliberately avoids a full Zod composition to keep the invariant
|
|
10
|
+
* "pack src/ MUST stay core-free": the authoritative Zod composition in core
|
|
11
|
+
* transitively depends on `delivery-review-contract`, per-section schemas, and
|
|
12
|
+
* other core-only modules that have not yet been migrated (INIT-058 Layer 4).
|
|
13
|
+
*
|
|
14
|
+
* Consumers that need a typed view of `workspace.yaml`'s `software_delivery`
|
|
15
|
+
* block can import from this file without crossing the package boundary.
|
|
16
|
+
* Drift against core's composition is enforced by
|
|
17
|
+
* `integration-tests/tests/config-parity.test.ts` — any field added to core's
|
|
18
|
+
* `LumenFlowConfig` must either be added here or explicitly waived in the
|
|
19
|
+
* drift-guard.
|
|
20
|
+
*
|
|
21
|
+
* @module config/schemas/lumenflow-config-schema
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { DURATION_MS } from '@lumenflow/kernel/primitives/duration-utils';
|
|
25
|
+
|
|
26
|
+
import { LUMENFLOW_CLIENT_IDS } from '../../constants/client-ids.js';
|
|
27
|
+
import { DOCS_LAYOUT_PRESETS } from '../../constants/docs-layout-presets.js';
|
|
28
|
+
import {
|
|
29
|
+
DEFAULT_MAX_ESLINT_WARNINGS,
|
|
30
|
+
DEFAULT_MIN_COVERAGE,
|
|
31
|
+
} from '../../constants/gate-constants.js';
|
|
32
|
+
|
|
33
|
+
const DEFAULT_LAYOUT = DOCS_LAYOUT_PRESETS.simple;
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Directories
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
export interface DirectoriesConfig {
|
|
40
|
+
appsWeb: string;
|
|
41
|
+
worktrees: string;
|
|
42
|
+
ai: string;
|
|
43
|
+
claude: string;
|
|
44
|
+
docs: string;
|
|
45
|
+
packages: string;
|
|
46
|
+
tools: string;
|
|
47
|
+
memoryBank: string;
|
|
48
|
+
wuDir: string;
|
|
49
|
+
initiativesDir: string;
|
|
50
|
+
backlogPath: string;
|
|
51
|
+
statusPath: string;
|
|
52
|
+
skillsDir: string;
|
|
53
|
+
agentsDir: string;
|
|
54
|
+
adrDir: string;
|
|
55
|
+
plansDir: string;
|
|
56
|
+
templatesDir: string;
|
|
57
|
+
onboardingDir: string;
|
|
58
|
+
completeGuidePath: string;
|
|
59
|
+
quickRefPath: string;
|
|
60
|
+
startingPromptPath: string;
|
|
61
|
+
sizingGuidePath: string;
|
|
62
|
+
governancePath: string;
|
|
63
|
+
safeGitPath: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const DIRECTORIES_DEFAULTS: DirectoriesConfig = {
|
|
67
|
+
appsWeb: '',
|
|
68
|
+
worktrees: 'worktrees/',
|
|
69
|
+
ai: 'ai/',
|
|
70
|
+
claude: '.claude/',
|
|
71
|
+
docs: 'docs/',
|
|
72
|
+
packages: 'packages/',
|
|
73
|
+
tools: 'tools/',
|
|
74
|
+
memoryBank: 'memory-bank/',
|
|
75
|
+
wuDir: `${DEFAULT_LAYOUT.tasks}/wu`,
|
|
76
|
+
initiativesDir: `${DEFAULT_LAYOUT.tasks}/initiatives`,
|
|
77
|
+
backlogPath: `${DEFAULT_LAYOUT.tasks}/backlog.md`,
|
|
78
|
+
statusPath: `${DEFAULT_LAYOUT.tasks}/status.md`,
|
|
79
|
+
skillsDir: '.claude/skills',
|
|
80
|
+
agentsDir: '.claude/agents',
|
|
81
|
+
adrDir: DEFAULT_LAYOUT.adrDir,
|
|
82
|
+
plansDir: `${DEFAULT_LAYOUT.operations}/plans`,
|
|
83
|
+
templatesDir: '.lumenflow/templates',
|
|
84
|
+
onboardingDir: DEFAULT_LAYOUT.onboarding,
|
|
85
|
+
completeGuidePath: DEFAULT_LAYOUT.completeGuidePath,
|
|
86
|
+
quickRefPath: DEFAULT_LAYOUT.quickRefPath,
|
|
87
|
+
startingPromptPath: DEFAULT_LAYOUT.startingPromptPath,
|
|
88
|
+
sizingGuidePath: DEFAULT_LAYOUT.sizingGuidePath,
|
|
89
|
+
governancePath: DEFAULT_LAYOUT.governancePath,
|
|
90
|
+
safeGitPath: 'scripts/safe-git',
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// State paths
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
export interface EventArchivalConfig {
|
|
98
|
+
archiveAfter: number;
|
|
99
|
+
keepArchives: boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface StatePathsConfig {
|
|
103
|
+
base: string;
|
|
104
|
+
stateDir: string;
|
|
105
|
+
archiveDir: string;
|
|
106
|
+
stampsDir: string;
|
|
107
|
+
mergeLock: string;
|
|
108
|
+
telemetry: string;
|
|
109
|
+
flowLog: string;
|
|
110
|
+
sessions: string;
|
|
111
|
+
incidents: string;
|
|
112
|
+
commandsLog: string;
|
|
113
|
+
eventArchival: EventArchivalConfig;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export const STATE_PATHS_DEFAULTS: StatePathsConfig = {
|
|
117
|
+
base: '.lumenflow',
|
|
118
|
+
stateDir: '.lumenflow/state',
|
|
119
|
+
archiveDir: '.lumenflow/archive',
|
|
120
|
+
stampsDir: '.lumenflow/stamps',
|
|
121
|
+
mergeLock: '.lumenflow/merge.lock',
|
|
122
|
+
telemetry: '.lumenflow/telemetry',
|
|
123
|
+
flowLog: '.lumenflow/flow.log',
|
|
124
|
+
sessions: '.lumenflow/sessions',
|
|
125
|
+
incidents: '.lumenflow/incidents',
|
|
126
|
+
commandsLog: '.lumenflow/commands.log',
|
|
127
|
+
eventArchival: {
|
|
128
|
+
archiveAfter: DURATION_MS.NINETY_DAYS,
|
|
129
|
+
keepArchives: true,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// ---------------------------------------------------------------------------
|
|
134
|
+
// Git
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
export interface PushRetryConfig {
|
|
138
|
+
enabled: boolean;
|
|
139
|
+
retries: number;
|
|
140
|
+
min_delay_ms: number;
|
|
141
|
+
max_delay_ms: number;
|
|
142
|
+
jitter: boolean;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface GitConfig {
|
|
146
|
+
mainBranch: string;
|
|
147
|
+
defaultRemote: string;
|
|
148
|
+
laneBranchPrefix: string;
|
|
149
|
+
tempBranchPrefix: string;
|
|
150
|
+
realGitPath: string;
|
|
151
|
+
maxBranchDrift: number;
|
|
152
|
+
branchDriftWarning: number;
|
|
153
|
+
branchDriftInfo: number;
|
|
154
|
+
requireRemote: boolean;
|
|
155
|
+
agentBranchPatterns: string[];
|
|
156
|
+
agentBranchPatternsOverride?: string[];
|
|
157
|
+
disableAgentPatternRegistry: boolean;
|
|
158
|
+
push_retry: PushRetryConfig;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export const GIT_DEFAULTS: GitConfig = {
|
|
162
|
+
mainBranch: 'main',
|
|
163
|
+
defaultRemote: 'origin',
|
|
164
|
+
laneBranchPrefix: 'lane/',
|
|
165
|
+
tempBranchPrefix: 'tmp/',
|
|
166
|
+
realGitPath: '/usr/bin/git',
|
|
167
|
+
maxBranchDrift: 20,
|
|
168
|
+
branchDriftWarning: 15,
|
|
169
|
+
branchDriftInfo: 10,
|
|
170
|
+
requireRemote: true,
|
|
171
|
+
agentBranchPatterns: [],
|
|
172
|
+
disableAgentPatternRegistry: false,
|
|
173
|
+
push_retry: {
|
|
174
|
+
enabled: true,
|
|
175
|
+
retries: 3,
|
|
176
|
+
min_delay_ms: 100,
|
|
177
|
+
max_delay_ms: 1000,
|
|
178
|
+
jitter: true,
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
// WU + IDs
|
|
184
|
+
// ---------------------------------------------------------------------------
|
|
185
|
+
|
|
186
|
+
export type WuBriefPolicyMode = 'off' | 'manual' | 'auto' | 'required';
|
|
187
|
+
|
|
188
|
+
export interface WuBriefConfig {
|
|
189
|
+
policyMode: WuBriefPolicyMode;
|
|
190
|
+
freshnessMinutes: number;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface WuConfig {
|
|
194
|
+
idPattern: string;
|
|
195
|
+
minDescriptionLength: number;
|
|
196
|
+
maxCommitSubject: number;
|
|
197
|
+
defaultPriority: string;
|
|
198
|
+
defaultStatus: string;
|
|
199
|
+
defaultType: string;
|
|
200
|
+
brief: WuBriefConfig;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export const WU_DEFAULTS: WuConfig = {
|
|
204
|
+
idPattern: '^WU-\\d+$',
|
|
205
|
+
minDescriptionLength: 50,
|
|
206
|
+
maxCommitSubject: 100,
|
|
207
|
+
defaultPriority: 'P2',
|
|
208
|
+
defaultStatus: 'ready',
|
|
209
|
+
defaultType: 'feature',
|
|
210
|
+
brief: {
|
|
211
|
+
policyMode: 'auto',
|
|
212
|
+
freshnessMinutes: 1440,
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export interface IdFormatConfig {
|
|
217
|
+
width: number;
|
|
218
|
+
strict: boolean;
|
|
219
|
+
prefix: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export const WU_ID_DEFAULTS: IdFormatConfig = {
|
|
223
|
+
width: 4,
|
|
224
|
+
strict: true,
|
|
225
|
+
prefix: 'WU-',
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export const INITIATIVE_ID_DEFAULTS: IdFormatConfig = {
|
|
229
|
+
width: 3,
|
|
230
|
+
strict: true,
|
|
231
|
+
prefix: 'INIT-',
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
// ---------------------------------------------------------------------------
|
|
235
|
+
// Gates (narrow subset — downstream cohorts only read a few fields)
|
|
236
|
+
// ---------------------------------------------------------------------------
|
|
237
|
+
|
|
238
|
+
export interface GatesConfig {
|
|
239
|
+
maxEslintWarnings: number;
|
|
240
|
+
enableCoverage: boolean;
|
|
241
|
+
minCoverage: number;
|
|
242
|
+
[extra: string]: unknown;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const GATES_DEFAULTS: GatesConfig = {
|
|
246
|
+
maxEslintWarnings: DEFAULT_MAX_ESLINT_WARNINGS,
|
|
247
|
+
enableCoverage: true,
|
|
248
|
+
minCoverage: DEFAULT_MIN_COVERAGE,
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
// UI + YAML + operational toggles
|
|
253
|
+
// ---------------------------------------------------------------------------
|
|
254
|
+
|
|
255
|
+
export interface UiConfig {
|
|
256
|
+
errorBoxWidth: number;
|
|
257
|
+
statusPreviewLines: number;
|
|
258
|
+
readinessBoxWidth: number;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export const UI_DEFAULTS: UiConfig = {
|
|
262
|
+
errorBoxWidth: 70,
|
|
263
|
+
statusPreviewLines: 5,
|
|
264
|
+
readinessBoxWidth: 50,
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export interface YamlConfig {
|
|
268
|
+
lineWidth: number;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export const YAML_DEFAULTS: YamlConfig = {
|
|
272
|
+
lineWidth: 100,
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export type ValidationMode = 'off' | 'warn' | 'error';
|
|
276
|
+
|
|
277
|
+
export interface ExperimentalConfig {
|
|
278
|
+
context_validation: boolean;
|
|
279
|
+
validation_mode: ValidationMode;
|
|
280
|
+
show_next_steps: boolean;
|
|
281
|
+
recovery_command: boolean;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export const EXPERIMENTAL_DEFAULTS: ExperimentalConfig = {
|
|
285
|
+
context_validation: true,
|
|
286
|
+
validation_mode: 'warn',
|
|
287
|
+
show_next_steps: true,
|
|
288
|
+
recovery_command: true,
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
export type CleanupTrigger = 'on_done' | 'on_init' | 'manual';
|
|
292
|
+
|
|
293
|
+
export interface CleanupConfig {
|
|
294
|
+
trigger: CleanupTrigger;
|
|
295
|
+
commit_message: string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export const CLEANUP_DEFAULTS: CleanupConfig = {
|
|
299
|
+
trigger: 'on_done',
|
|
300
|
+
commit_message: 'chore: lumenflow state cleanup [skip ci]',
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export interface MethodologyTelemetryConfig {
|
|
304
|
+
enabled: boolean;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface TelemetryConfig {
|
|
308
|
+
methodology: MethodologyTelemetryConfig;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export const TELEMETRY_DEFAULTS: TelemetryConfig = {
|
|
312
|
+
methodology: { enabled: false },
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
export interface EscalationConfig {
|
|
316
|
+
email: string;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export const ESCALATION_DEFAULTS: EscalationConfig = {
|
|
320
|
+
email: 'escalation@example.com',
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
// ---------------------------------------------------------------------------
|
|
324
|
+
// Memory (narrow — only top-level fields with defaults)
|
|
325
|
+
// ---------------------------------------------------------------------------
|
|
326
|
+
|
|
327
|
+
export interface MemoryConfig {
|
|
328
|
+
directory: string;
|
|
329
|
+
sessionTtl: number;
|
|
330
|
+
checkpointTtl: number;
|
|
331
|
+
enableAutoCleanup: boolean;
|
|
332
|
+
delegation_context_max_size: number;
|
|
333
|
+
[extra: string]: unknown;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export const MEMORY_DEFAULTS: MemoryConfig = {
|
|
337
|
+
directory: 'memory-bank/',
|
|
338
|
+
sessionTtl: DURATION_MS.SEVEN_DAYS,
|
|
339
|
+
checkpointTtl: DURATION_MS.THIRTY_DAYS,
|
|
340
|
+
enableAutoCleanup: true,
|
|
341
|
+
delegation_context_max_size: 4096,
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
// ---------------------------------------------------------------------------
|
|
345
|
+
// Agents (narrow — only defaultClient, which many cohorts need)
|
|
346
|
+
// ---------------------------------------------------------------------------
|
|
347
|
+
|
|
348
|
+
export interface AgentsConfig {
|
|
349
|
+
defaultClient: string;
|
|
350
|
+
[extra: string]: unknown;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export const AGENTS_DEFAULTS: AgentsConfig = {
|
|
354
|
+
defaultClient: LUMENFLOW_CLIENT_IDS.CLAUDE_CODE,
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
// ---------------------------------------------------------------------------
|
|
358
|
+
// Cloud + lanes + methodology: loose pass-through
|
|
359
|
+
// ---------------------------------------------------------------------------
|
|
360
|
+
|
|
361
|
+
export interface CloudEnvSignal {
|
|
362
|
+
name: string;
|
|
363
|
+
equals?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface CloudConfig {
|
|
367
|
+
auto_detect: boolean;
|
|
368
|
+
env_signals: CloudEnvSignal[];
|
|
369
|
+
[extra: string]: unknown;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export const CLOUD_DEFAULTS: CloudConfig = {
|
|
373
|
+
auto_detect: false,
|
|
374
|
+
env_signals: [],
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
// ---------------------------------------------------------------------------
|
|
378
|
+
// Top-level LumenflowConfig
|
|
379
|
+
// ---------------------------------------------------------------------------
|
|
380
|
+
|
|
381
|
+
export type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun';
|
|
382
|
+
export type TestRunner = 'vitest' | 'jest' | 'mocha';
|
|
383
|
+
|
|
384
|
+
export interface LumenflowConfig {
|
|
385
|
+
version: string;
|
|
386
|
+
directories: DirectoriesConfig;
|
|
387
|
+
state: StatePathsConfig;
|
|
388
|
+
git: GitConfig;
|
|
389
|
+
wu: WuConfig;
|
|
390
|
+
wuId: IdFormatConfig;
|
|
391
|
+
initiativeId: IdFormatConfig;
|
|
392
|
+
gates: GatesConfig;
|
|
393
|
+
memory: MemoryConfig;
|
|
394
|
+
ui: UiConfig;
|
|
395
|
+
yaml: YamlConfig;
|
|
396
|
+
agents: AgentsConfig;
|
|
397
|
+
experimental: ExperimentalConfig;
|
|
398
|
+
cleanup: CleanupConfig;
|
|
399
|
+
telemetry: TelemetryConfig;
|
|
400
|
+
methodology?: Record<string, unknown>;
|
|
401
|
+
cloud: CloudConfig;
|
|
402
|
+
lanes?: Record<string, unknown>;
|
|
403
|
+
escalation: EscalationConfig;
|
|
404
|
+
package_manager: PackageManager;
|
|
405
|
+
test_runner: TestRunner;
|
|
406
|
+
build_command: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Top-level defaults for `LumenflowConfig`. Matches the `.parse({})` output of
|
|
411
|
+
* `core`'s `LumenFlowConfigSchema` for every field exposed here. The drift-guard
|
|
412
|
+
* in `integration-tests/tests/config-parity.test.ts` walks these keys and
|
|
413
|
+
* asserts field-for-field parity with core's output.
|
|
414
|
+
*/
|
|
415
|
+
export const LUMENFLOW_CONFIG_DEFAULTS: LumenflowConfig = {
|
|
416
|
+
version: '1.0.0',
|
|
417
|
+
directories: DIRECTORIES_DEFAULTS,
|
|
418
|
+
state: STATE_PATHS_DEFAULTS,
|
|
419
|
+
git: GIT_DEFAULTS,
|
|
420
|
+
wu: WU_DEFAULTS,
|
|
421
|
+
wuId: WU_ID_DEFAULTS,
|
|
422
|
+
initiativeId: INITIATIVE_ID_DEFAULTS,
|
|
423
|
+
gates: GATES_DEFAULTS,
|
|
424
|
+
memory: MEMORY_DEFAULTS,
|
|
425
|
+
ui: UI_DEFAULTS,
|
|
426
|
+
yaml: YAML_DEFAULTS,
|
|
427
|
+
agents: AGENTS_DEFAULTS,
|
|
428
|
+
experimental: EXPERIMENTAL_DEFAULTS,
|
|
429
|
+
cleanup: CLEANUP_DEFAULTS,
|
|
430
|
+
telemetry: TELEMETRY_DEFAULTS,
|
|
431
|
+
cloud: CLOUD_DEFAULTS,
|
|
432
|
+
escalation: ESCALATION_DEFAULTS,
|
|
433
|
+
package_manager: 'pnpm',
|
|
434
|
+
test_runner: 'vitest',
|
|
435
|
+
build_command: 'pnpm build',
|
|
436
|
+
};
|