@lumenflow/core 2.2.2 → 2.3.2
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/dist/active-wu-detector.d.ts +1 -1
- package/dist/active-wu-detector.js +1 -1
- package/dist/arg-parser.js +51 -18
- package/dist/backlog-generator.d.ts +4 -4
- package/dist/backlog-generator.js +4 -4
- package/dist/backlog-sync-validator.js +1 -1
- package/dist/cleanup-lock.d.ts +9 -2
- package/dist/cleanup-lock.js +17 -7
- package/dist/code-path-validator.d.ts +3 -3
- package/dist/code-path-validator.js +3 -3
- package/dist/compliance-parser.d.ts +1 -1
- package/dist/compliance-parser.js +1 -1
- package/dist/constants/backlog-patterns.d.ts +1 -1
- package/dist/constants/backlog-patterns.js +1 -1
- package/dist/constants/dora-constants.d.ts +1 -1
- package/dist/constants/dora-constants.js +1 -1
- package/dist/constants/gate-constants.d.ts +1 -1
- package/dist/constants/gate-constants.js +1 -1
- package/dist/constants/linter-constants.d.ts +1 -1
- package/dist/constants/linter-constants.js +1 -1
- package/dist/constants/tokenizer-constants.d.ts +1 -1
- package/dist/constants/tokenizer-constants.js +1 -1
- package/dist/context/location-resolver.js +2 -1
- package/dist/context-validation-integration.d.ts +1 -0
- package/dist/core/scope-checker.d.ts +3 -3
- package/dist/core/scope-checker.js +3 -3
- package/dist/core/tool-runner.d.ts +5 -5
- package/dist/core/tool-runner.js +5 -5
- package/dist/core/tool.constants.d.ts +1 -1
- package/dist/core/tool.constants.js +1 -1
- package/dist/core/tool.schemas.d.ts +2 -2
- package/dist/core/tool.schemas.js +1 -1
- package/dist/core/worktree-guard.d.ts +1 -1
- package/dist/core/worktree-guard.js +1 -1
- package/dist/coverage-gate.d.ts +12 -3
- package/dist/coverage-gate.js +15 -8
- package/dist/date-utils.d.ts +4 -4
- package/dist/date-utils.js +4 -4
- package/dist/dependency-graph.d.ts +6 -0
- package/dist/dependency-graph.js +43 -2
- package/dist/dependency-guard.d.ts +2 -2
- package/dist/dependency-guard.js +3 -3
- package/dist/dependency-validator.d.ts +4 -4
- package/dist/dependency-validator.js +4 -7
- package/dist/domain/orchestration.constants.d.ts +31 -10
- package/dist/domain/orchestration.constants.js +45 -16
- package/dist/domain/orchestration.schemas.d.ts +54 -28
- package/dist/domain/orchestration.schemas.js +2 -2
- package/dist/domain/orchestration.types.d.ts +2 -2
- package/dist/domain/orchestration.types.js +2 -2
- package/dist/error-handler.d.ts +10 -10
- package/dist/error-handler.js +10 -10
- package/dist/file-classifiers.d.ts +6 -6
- package/dist/file-classifiers.js +6 -6
- package/dist/gates-config.d.ts +74 -0
- package/dist/gates-config.js +209 -2
- package/dist/git-adapter.d.ts +11 -11
- package/dist/git-adapter.js +11 -11
- package/dist/git-context-extractor.d.ts +112 -0
- package/dist/git-context-extractor.js +559 -0
- package/dist/hardcoded-strings.d.ts +1 -1
- package/dist/hardcoded-strings.js +1 -1
- package/dist/incremental-lint.d.ts +1 -1
- package/dist/incremental-lint.js +2 -2
- package/dist/incremental-test.d.ts +1 -1
- package/dist/incremental-test.js +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +25 -0
- package/dist/invariants/check-automated-tests.d.ts +2 -2
- package/dist/invariants/check-automated-tests.js +3 -3
- package/dist/lane-checker.d.ts +28 -7
- package/dist/lane-checker.js +316 -159
- package/dist/lane-suggest-prompt.d.ts +108 -0
- package/dist/lane-suggest-prompt.js +359 -0
- package/dist/lane-validator.d.ts +3 -3
- package/dist/lane-validator.js +3 -3
- package/dist/logs-lib.d.ts +1 -1
- package/dist/logs-lib.js +1 -1
- package/dist/lumenflow-config-schema.d.ts +162 -0
- package/dist/lumenflow-config-schema.js +180 -0
- package/dist/manual-test-validator.d.ts +2 -2
- package/dist/manual-test-validator.js +3 -3
- package/dist/merge-lock.d.ts +8 -1
- package/dist/merge-lock.js +16 -7
- package/dist/micro-worktree.d.ts +81 -13
- package/dist/micro-worktree.js +98 -17
- package/dist/migration-deployer.d.ts +1 -1
- package/dist/migration-deployer.js +1 -1
- package/dist/orchestration-advisory-loader.d.ts +2 -2
- package/dist/orchestration-advisory-loader.js +10 -6
- package/dist/orchestration-advisory.d.ts +3 -3
- package/dist/orchestration-advisory.js +4 -4
- package/dist/orchestration-di.d.ts +4 -4
- package/dist/orchestration-di.js +4 -4
- package/dist/orchestration-rules.d.ts +4 -4
- package/dist/orchestration-rules.js +18 -10
- package/dist/orphan-detector.d.ts +3 -3
- package/dist/orphan-detector.js +3 -3
- package/dist/patrol-loop.d.ts +170 -0
- package/dist/patrol-loop.js +186 -0
- package/dist/process-detector.d.ts +5 -5
- package/dist/process-detector.js +5 -5
- package/dist/rebase-artifact-cleanup.d.ts +3 -3
- package/dist/rebase-artifact-cleanup.js +3 -3
- package/dist/resolve-policy.d.ts +195 -0
- package/dist/resolve-policy.js +203 -0
- package/dist/risk-detector.d.ts +2 -2
- package/dist/risk-detector.js +2 -2
- package/dist/rollback-utils.d.ts +1 -1
- package/dist/rollback-utils.js +1 -1
- package/dist/section-headings.d.ts +1 -1
- package/dist/section-headings.js +1 -1
- package/dist/spawn-escalation.d.ts +4 -4
- package/dist/spawn-escalation.js +3 -3
- package/dist/spawn-monitor.d.ts +4 -4
- package/dist/spawn-monitor.js +4 -4
- package/dist/spawn-recovery.d.ts +3 -3
- package/dist/spawn-recovery.js +3 -3
- package/dist/spawn-registry-schema.d.ts +2 -2
- package/dist/spawn-registry-schema.js +2 -2
- package/dist/spawn-registry-store.d.ts +2 -2
- package/dist/spawn-registry-store.js +2 -2
- package/dist/spawn-strategy.d.ts +17 -11
- package/dist/spawn-strategy.js +47 -44
- package/dist/spawn-tree.d.ts +3 -3
- package/dist/spawn-tree.js +3 -3
- package/dist/state-cleanup-core.d.ts +205 -0
- package/dist/state-cleanup-core.js +240 -0
- package/dist/state-doctor-core.d.ts +168 -0
- package/dist/state-doctor-core.js +251 -0
- package/dist/stream-error-handler.d.ts +67 -0
- package/dist/stream-error-handler.js +94 -0
- package/dist/telemetry.d.ts +1 -1
- package/dist/telemetry.js +1 -1
- package/dist/template-loader.d.ts +162 -0
- package/dist/template-loader.js +372 -0
- package/dist/test-baseline.d.ts +176 -0
- package/dist/test-baseline.js +282 -0
- package/dist/usecases/get-suggestions.usecase.d.ts +1 -1
- package/dist/validation/command-registry.js +37 -0
- package/dist/validators/backlog-sync.js +4 -2
- package/dist/worktree-scanner.d.ts +1 -1
- package/dist/worktree-scanner.js +1 -1
- package/dist/worktree-symlink.d.ts +3 -3
- package/dist/worktree-symlink.js +3 -3
- package/dist/wu-backlog-updater.d.ts +1 -1
- package/dist/wu-backlog-updater.js +1 -1
- package/dist/wu-claim-helpers.d.ts +1 -1
- package/dist/wu-claim-helpers.js +1 -1
- package/dist/wu-claim-resume.d.ts +1 -1
- package/dist/wu-claim-resume.js +1 -1
- package/dist/wu-consistency-checker.d.ts +1 -1
- package/dist/wu-consistency-checker.js +17 -11
- package/dist/wu-constants.d.ts +73 -21
- package/dist/wu-constants.js +65 -22
- package/dist/wu-done-branch-only.d.ts +1 -1
- package/dist/wu-done-branch-only.js +1 -1
- package/dist/wu-done-docs-generate.d.ts +1 -1
- package/dist/wu-done-docs-generate.js +1 -1
- package/dist/wu-done-messages.d.ts +2 -2
- package/dist/wu-done-messages.js +2 -2
- package/dist/wu-done-metadata.d.ts +3 -3
- package/dist/wu-done-metadata.js +3 -3
- package/dist/wu-done-pr.d.ts +1 -1
- package/dist/wu-done-pr.js +4 -2
- package/dist/wu-done-preflight.d.ts +8 -0
- package/dist/wu-done-preflight.js +18 -2
- package/dist/wu-done-ui.d.ts +3 -3
- package/dist/wu-done-ui.js +3 -3
- package/dist/wu-done-validation.d.ts +30 -0
- package/dist/wu-done-validation.js +106 -1
- package/dist/wu-done-worktree.d.ts +1 -1
- package/dist/wu-done-worktree.js +11 -1
- package/dist/wu-events-cleanup.d.ts +148 -0
- package/dist/wu-events-cleanup.js +401 -0
- package/dist/wu-helpers.d.ts +2 -2
- package/dist/wu-helpers.js +2 -2
- package/dist/wu-id-generator.d.ts +58 -0
- package/dist/wu-id-generator.js +103 -0
- package/dist/wu-lint.js +1 -1
- package/dist/wu-preflight-validators.d.ts +13 -1
- package/dist/wu-preflight-validators.js +56 -1
- package/dist/wu-recovery.d.ts +2 -2
- package/dist/wu-recovery.js +4 -4
- package/dist/wu-repair-core.d.ts +5 -5
- package/dist/wu-repair-core.js +6 -6
- package/dist/wu-schema-normalization.d.ts +1 -1
- package/dist/wu-schema-normalization.js +1 -1
- package/dist/wu-schema.d.ts +7 -7
- package/dist/wu-schema.js +8 -8
- package/dist/wu-spawn-context.d.ts +87 -0
- package/dist/wu-spawn-context.js +175 -0
- package/dist/wu-spawn-helpers.d.ts +1 -1
- package/dist/wu-spawn-helpers.js +1 -1
- package/dist/wu-spawn.d.ts +177 -4
- package/dist/wu-spawn.js +694 -72
- package/dist/wu-state-schema.d.ts +1 -1
- package/dist/wu-state-schema.js +1 -1
- package/dist/wu-state-store.d.ts +3 -3
- package/dist/wu-state-store.js +3 -3
- package/dist/wu-status-transition.d.ts +1 -1
- package/dist/wu-status-transition.js +1 -1
- package/dist/wu-status-updater.d.ts +3 -3
- package/dist/wu-status-updater.js +3 -3
- package/dist/wu-validation-constants.d.ts +2 -2
- package/dist/wu-validation-constants.js +2 -2
- package/dist/wu-validation.d.ts +3 -3
- package/dist/wu-validation.js +3 -3
- package/dist/wu-yaml-fixer.d.ts +2 -2
- package/dist/wu-yaml-fixer.js +3 -3
- package/dist/wu-yaml.d.ts +23 -0
- package/dist/wu-yaml.js +76 -2
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -68,6 +68,12 @@ export * from './stamp-utils.js';
|
|
|
68
68
|
// Configuration
|
|
69
69
|
export * from './lumenflow-config.js';
|
|
70
70
|
export * from './lumenflow-config-schema.js';
|
|
71
|
+
// WU Events Cleanup (WU-1207)
|
|
72
|
+
export * from './wu-events-cleanup.js';
|
|
73
|
+
// State Cleanup Orchestration (WU-1208)
|
|
74
|
+
export * from './state-cleanup-core.js';
|
|
75
|
+
// State Doctor Integrity Checking (WU-1209)
|
|
76
|
+
export * from './state-doctor-core.js';
|
|
71
77
|
// Gates configuration (WU-1067)
|
|
72
78
|
export * from './gates-config.js';
|
|
73
79
|
// Branch check utilities
|
|
@@ -80,6 +86,9 @@ export * from './lumenflow-home.js';
|
|
|
80
86
|
export * from './force-bypass-audit.js';
|
|
81
87
|
// WU-1075: LumenFlow directory paths (exported from wu-constants)
|
|
82
88
|
export { LUMENFLOW_PATHS, BEACON_PATHS } from './wu-constants.js';
|
|
89
|
+
// WU-1233: Stream error handling (EPIPE protection)
|
|
90
|
+
export { STREAM_ERRORS, EXIT_CODES } from './wu-constants.js';
|
|
91
|
+
export * from './stream-error-handler.js';
|
|
83
92
|
// WU-1085: Color support for NO_COLOR/FORCE_COLOR/--no-color
|
|
84
93
|
export * from './color-support.js';
|
|
85
94
|
// WU-1090: Context-aware state machine for WU lifecycle commands
|
|
@@ -122,6 +131,10 @@ ComputeContextUseCase,
|
|
|
122
131
|
ValidateCommandUseCase,
|
|
123
132
|
// Recovery use cases
|
|
124
133
|
AnalyzeRecoveryUseCase, } from './usecases/index.js';
|
|
134
|
+
// WU-1189: Lane suggestion prompt generation
|
|
135
|
+
export * from './lane-suggest-prompt.js';
|
|
136
|
+
// WU-1190: Git context extraction for lane suggestion
|
|
137
|
+
export * from './git-context-extractor.js';
|
|
125
138
|
// WU-1094: Dependency Injection - Factory functions for wiring
|
|
126
139
|
export {
|
|
127
140
|
// Adapter factory functions
|
|
@@ -130,3 +143,15 @@ createContextAdapters, createValidationAdapters, createRecoveryAdapters,
|
|
|
130
143
|
createComputeContextUseCase, createValidateCommandUseCase, createAnalyzeRecoveryUseCase,
|
|
131
144
|
// Backwards compatible convenience functions
|
|
132
145
|
computeWuContext, validateCommand, analyzeRecoveryIssues, } from './context-di.js';
|
|
146
|
+
// WU-1246: WU ID auto-generation
|
|
147
|
+
export * from './wu-id-generator.js';
|
|
148
|
+
// WU-1253: Test baseline ratchet pattern
|
|
149
|
+
export * from './test-baseline.js';
|
|
150
|
+
// WU-1253: Template loader for extracting prompt templates
|
|
151
|
+
export { loadManifest, loadTemplate, loadTemplatesWithOverrides, assembleTemplates, replaceTokens, evaluateCondition, } from './template-loader.js';
|
|
152
|
+
// WU-1253: Template-based spawn prompt generation
|
|
153
|
+
export { tryAssembleSpawnTemplates, buildTemplateContext } from './wu-spawn.js';
|
|
154
|
+
// WU-1242: Patrol loop for continuous spawn monitoring
|
|
155
|
+
export * from './patrol-loop.js';
|
|
156
|
+
// WU-1259: Methodology policy resolution
|
|
157
|
+
export { resolvePolicy, getDefaultPolicy, MethodologyConfigSchema, MethodologyOverridesSchema, TestingMethodologySchema, ArchitectureMethodologySchema, CoverageModeSchema, TESTING_METHODOLOGY, ARCHITECTURE_METHODOLOGY, COVERAGE_MODE, } from './resolve-policy.js';
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Library-first check: This is custom validation logic for PatientPath WU workflow.
|
|
11
11
|
* No external library exists for WU YAML validation - this integrates with
|
|
12
|
-
* the existing manual-test-validator.
|
|
12
|
+
* the existing manual-test-validator.ts which already implements the core logic.
|
|
13
13
|
*
|
|
14
|
-
* @see {@link
|
|
14
|
+
* @see {@link packages/@lumenflow/cli/src/lib/manual-test-validator.ts} - Core validation logic
|
|
15
15
|
* @see {@link tools/invariants.yml} - Invariant registry
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Library-first check: This is custom validation logic for PatientPath WU workflow.
|
|
11
11
|
* No external library exists for WU YAML validation - this integrates with
|
|
12
|
-
* the existing manual-test-validator.
|
|
12
|
+
* the existing manual-test-validator.ts which already implements the core logic.
|
|
13
13
|
*
|
|
14
|
-
* @see {@link
|
|
14
|
+
* @see {@link packages/@lumenflow/cli/src/lib/manual-test-validator.ts} - Core validation logic
|
|
15
15
|
* @see {@link tools/invariants.yml} - Invariant registry
|
|
16
16
|
*/
|
|
17
17
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
@@ -55,7 +55,7 @@ function checkWUFile(filePath, options = {}) {
|
|
|
55
55
|
if (!skipStatusCheck && !ACTIVE_STATUSES.includes(status)) {
|
|
56
56
|
return { valid: true, wuId, error: null };
|
|
57
57
|
}
|
|
58
|
-
// Use the existing validation logic from manual-test-validator.
|
|
58
|
+
// Use the existing validation logic from manual-test-validator.ts
|
|
59
59
|
const result = validateAutomatedTestRequirement(doc);
|
|
60
60
|
if (!result.valid) {
|
|
61
61
|
return {
|
package/dist/lane-checker.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Lane Occupancy Checker
|
|
4
4
|
*
|
|
5
5
|
* Enforces one-WU-per-lane rule by checking status.md for active WUs in a given lane.
|
|
6
|
-
* Used by wu-claim.
|
|
6
|
+
* Used by wu-claim.ts and wu-unblock.ts to prevent WIP violations.
|
|
7
7
|
*/
|
|
8
8
|
import { getSubLanesForParent } from './lane-inference.js';
|
|
9
9
|
interface ValidateLaneOptions {
|
|
@@ -42,12 +42,6 @@ export { getSubLanesForParent };
|
|
|
42
42
|
* @returns {string} Parent lane name
|
|
43
43
|
*/
|
|
44
44
|
export declare function extractParent(lane: string): string;
|
|
45
|
-
/**
|
|
46
|
-
* Validation mode options
|
|
47
|
-
* @typedef {Object} ValidateLaneOptions
|
|
48
|
-
* @property {boolean} [strict=true] - When true, throws error for parent-only lanes with taxonomy.
|
|
49
|
-
* When false, only warns (for existing WU validation).
|
|
50
|
-
*/
|
|
51
45
|
/**
|
|
52
46
|
* Validate lane format and parent existence
|
|
53
47
|
* @param {string} lane - Lane name (e.g., "Operations: Tooling" or "Operations")
|
|
@@ -81,3 +75,30 @@ export declare function getWipLimitForLane(lane: string, options?: GetWipLimitOp
|
|
|
81
75
|
* @returns {{ free: boolean, occupiedBy: string | null, error: string | null, inProgressWUs?: string[], wipLimit?: number, currentCount?: number }}
|
|
82
76
|
*/
|
|
83
77
|
export declare function checkLaneFree(statusPath: string, lane: string, wuid: string, options?: CheckLaneFreeOptions): CheckLaneFreeResult;
|
|
78
|
+
/** WU-1187: Options for checkWipJustification */
|
|
79
|
+
interface CheckWipJustificationOptions {
|
|
80
|
+
/** Path to .lumenflow.config.yaml (for testing) */
|
|
81
|
+
configPath?: string;
|
|
82
|
+
}
|
|
83
|
+
/** WU-1187: Result of WIP justification check */
|
|
84
|
+
interface CheckWipJustificationResult {
|
|
85
|
+
/** Always true - this is soft enforcement (warning only) */
|
|
86
|
+
valid: boolean;
|
|
87
|
+
/** Warning message if WIP > 1 without justification, null otherwise */
|
|
88
|
+
warning: string | null;
|
|
89
|
+
/** True if the lane needs justification but doesn't have one */
|
|
90
|
+
requiresJustification: boolean;
|
|
91
|
+
/** The wip_justification from config, if present */
|
|
92
|
+
justification?: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* WU-1187: Check if a lane has WIP justification when required
|
|
96
|
+
*
|
|
97
|
+
* Philosophy: If you need WIP > 1, you need better lanes, not higher limits.
|
|
98
|
+
* This is soft enforcement: logs a warning at claim time, but doesn't block.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} lane - Lane name to check
|
|
101
|
+
* @param {CheckWipJustificationOptions} options - Options including configPath for testing
|
|
102
|
+
* @returns {CheckWipJustificationResult} Result with valid=true (always) and optional warning
|
|
103
|
+
*/
|
|
104
|
+
export declare function checkWipJustification(lane: string, options?: CheckWipJustificationOptions): CheckWipJustificationResult;
|