@lumenflow/packs-software-delivery 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/dist/manifest-schema.d.ts +12 -0
- package/dist/manifest-schema.d.ts.map +1 -1
- package/dist/manifest-schema.js +10 -0
- package/dist/manifest-schema.js.map +1 -1
- package/dist/manifest.d.ts +21 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +92 -1
- package/dist/manifest.js.map +1 -1
- package/dist/src/commands/index.d.ts +2 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +5 -0
- package/dist/src/commands/index.js.map +1 -0
- package/dist/src/config/delivery-review-contract.d.ts +17 -0
- package/dist/src/config/delivery-review-contract.d.ts.map +1 -0
- package/dist/src/config/delivery-review-contract.js +19 -0
- package/dist/src/config/delivery-review-contract.js.map +1 -0
- package/dist/src/config/env-accessors.d.ts +16 -0
- package/dist/src/config/env-accessors.d.ts.map +1 -0
- package/dist/src/config/env-accessors.js +18 -0
- package/dist/src/config/env-accessors.js.map +1 -0
- package/dist/src/config/index.d.ts +3 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +8 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/normalize-config-keys.d.ts +16 -0
- package/dist/src/config/normalize-config-keys.d.ts.map +1 -0
- package/dist/src/config/normalize-config-keys.js +18 -0
- package/dist/src/config/normalize-config-keys.js.map +1 -0
- package/dist/src/config/schemas/lumenflow-config-schema-types.d.ts +190 -0
- package/dist/src/config/schemas/lumenflow-config-schema-types.d.ts.map +1 -0
- package/dist/src/config/schemas/lumenflow-config-schema-types.js +182 -0
- package/dist/src/config/schemas/lumenflow-config-schema-types.js.map +1 -0
- package/dist/src/config/schemas/lumenflow-config-schema.d.ts +190 -0
- package/dist/src/config/schemas/lumenflow-config-schema.d.ts.map +1 -0
- package/dist/src/config/schemas/lumenflow-config-schema.js +182 -0
- package/dist/src/config/schemas/lumenflow-config-schema.js.map +1 -0
- package/dist/src/config/workspace-reader.d.ts +56 -0
- package/dist/src/config/workspace-reader.d.ts.map +1 -0
- package/dist/src/config/workspace-reader.js +209 -0
- package/dist/src/config/workspace-reader.js.map +1 -0
- package/dist/src/constants/backlog-patterns.d.ts +21 -0
- package/dist/src/constants/backlog-patterns.d.ts.map +1 -0
- package/dist/src/constants/backlog-patterns.js +26 -0
- package/dist/src/constants/backlog-patterns.js.map +1 -0
- package/dist/src/constants/client-ids.d.ts +16 -0
- package/dist/src/constants/client-ids.d.ts.map +1 -0
- package/dist/src/constants/client-ids.js +16 -0
- package/dist/src/constants/client-ids.js.map +1 -0
- package/dist/src/constants/config-contract.d.ts +2 -0
- package/dist/src/constants/config-contract.d.ts.map +1 -0
- package/dist/src/constants/config-contract.js +7 -0
- package/dist/src/constants/config-contract.js.map +1 -0
- package/dist/src/constants/docs-layout-presets.d.ts +31 -0
- package/dist/src/constants/docs-layout-presets.d.ts.map +1 -0
- package/dist/src/constants/docs-layout-presets.js +41 -0
- package/dist/src/constants/docs-layout-presets.js.map +1 -0
- package/dist/src/constants/duration-constants.d.ts +11 -0
- package/dist/src/constants/duration-constants.d.ts.map +1 -0
- package/dist/src/constants/duration-constants.js +13 -0
- package/dist/src/constants/duration-constants.js.map +1 -0
- package/dist/src/constants/gate-constants.d.ts +24 -0
- package/dist/src/constants/gate-constants.d.ts.map +1 -0
- package/dist/src/constants/gate-constants.js +26 -0
- package/dist/src/constants/gate-constants.js.map +1 -0
- package/dist/src/constants/index.d.ts +18 -0
- package/dist/src/constants/index.d.ts.map +1 -0
- package/dist/src/constants/index.js +29 -0
- package/dist/src/constants/index.js.map +1 -0
- package/dist/src/constants/lock-constants.d.ts +29 -0
- package/dist/src/constants/lock-constants.d.ts.map +1 -0
- package/dist/src/constants/lock-constants.js +31 -0
- package/dist/src/constants/lock-constants.js.map +1 -0
- package/dist/src/constants/object-guards.d.ts +9 -0
- package/dist/src/constants/object-guards.d.ts.map +1 -0
- package/dist/src/constants/object-guards.js +11 -0
- package/dist/src/constants/object-guards.js.map +1 -0
- package/dist/src/constants/section-headings.d.ts +35 -0
- package/dist/src/constants/section-headings.d.ts.map +1 -0
- package/dist/src/constants/section-headings.js +82 -0
- package/dist/src/constants/section-headings.js.map +1 -0
- package/dist/src/constants/wu-cli-constants.d.ts +434 -0
- package/dist/src/constants/wu-cli-constants.d.ts.map +1 -0
- package/dist/src/constants/wu-cli-constants.js +439 -0
- package/dist/src/constants/wu-cli-constants.js.map +1 -0
- package/dist/src/constants/wu-domain-constants.d.ts +296 -0
- package/dist/src/constants/wu-domain-constants.d.ts.map +1 -0
- package/dist/src/constants/wu-domain-constants.js +400 -0
- package/dist/src/constants/wu-domain-constants.js.map +1 -0
- package/dist/src/constants/wu-git-constants.d.ts +2 -0
- package/dist/src/constants/wu-git-constants.d.ts.map +1 -0
- package/dist/src/constants/wu-git-constants.js +7 -0
- package/dist/src/constants/wu-git-constants.js.map +1 -0
- package/dist/src/constants/wu-id-format.d.ts +138 -0
- package/dist/src/constants/wu-id-format.d.ts.map +1 -0
- package/dist/src/constants/wu-id-format.js +265 -0
- package/dist/src/constants/wu-id-format.js.map +1 -0
- package/dist/src/constants/wu-paths-constants.d.ts +254 -0
- package/dist/src/constants/wu-paths-constants.d.ts.map +1 -0
- package/dist/src/constants/wu-paths-constants.js +276 -0
- package/dist/src/constants/wu-paths-constants.js.map +1 -0
- package/dist/src/constants/wu-statuses.d.ts +209 -0
- package/dist/src/constants/wu-statuses.d.ts.map +1 -0
- package/dist/src/constants/wu-statuses.js +245 -0
- package/dist/src/constants/wu-statuses.js.map +1 -0
- package/dist/src/constants/wu-type-helpers.d.ts +28 -0
- package/dist/src/constants/wu-type-helpers.d.ts.map +1 -0
- package/dist/src/constants/wu-type-helpers.js +49 -0
- package/dist/src/constants/wu-type-helpers.js.map +1 -0
- package/dist/src/constants/wu-ui-constants.d.ts +236 -0
- package/dist/src/constants/wu-ui-constants.d.ts.map +1 -0
- package/dist/src/constants/wu-ui-constants.js +238 -0
- package/dist/src/constants/wu-ui-constants.js.map +1 -0
- package/dist/src/constants/wu-validation-constants.d.ts +61 -0
- package/dist/src/constants/wu-validation-constants.d.ts.map +1 -0
- package/dist/src/constants/wu-validation-constants.js +69 -0
- package/dist/src/constants/wu-validation-constants.js.map +1 -0
- package/dist/src/domain/index.d.ts +4 -0
- package/dist/src/domain/index.d.ts.map +1 -0
- package/dist/src/domain/index.js +6 -0
- package/dist/src/domain/index.js.map +1 -0
- package/dist/src/domain/orchestration.constants.d.ts +111 -0
- package/dist/src/domain/orchestration.constants.d.ts.map +1 -0
- package/dist/src/domain/orchestration.constants.js +130 -0
- package/dist/src/domain/orchestration.constants.js.map +1 -0
- package/dist/src/domain/orchestration.schemas.d.ts +307 -0
- package/dist/src/domain/orchestration.schemas.d.ts.map +1 -0
- package/dist/src/domain/orchestration.schemas.js +214 -0
- package/dist/src/domain/orchestration.schemas.js.map +1 -0
- package/dist/src/domain/orchestration.types.d.ts +134 -0
- package/dist/src/domain/orchestration.types.d.ts.map +1 -0
- package/dist/src/domain/orchestration.types.js +5 -0
- package/dist/src/domain/orchestration.types.js.map +1 -0
- package/dist/src/methodology/incremental-test.d.ts +33 -0
- package/dist/src/methodology/incremental-test.d.ts.map +1 -0
- package/dist/src/methodology/incremental-test.js +73 -0
- package/dist/src/methodology/incremental-test.js.map +1 -0
- package/dist/src/methodology/index.d.ts +3 -0
- package/dist/src/methodology/index.d.ts.map +1 -0
- package/dist/src/methodology/index.js +6 -0
- package/dist/src/methodology/index.js.map +1 -0
- package/dist/src/methodology/manual-test-validator.d.ts +97 -0
- package/dist/src/methodology/manual-test-validator.d.ts.map +1 -0
- package/dist/src/methodology/manual-test-validator.js +248 -0
- package/dist/src/methodology/manual-test-validator.js.map +1 -0
- package/dist/src/policy/coverage-gate.d.ts +127 -0
- package/dist/src/policy/coverage-gate.d.ts.map +1 -0
- package/dist/src/policy/coverage-gate.js +211 -0
- package/dist/src/policy/coverage-gate.js.map +1 -0
- package/dist/src/policy/gates-agent-mode.d.ts +107 -0
- package/dist/src/policy/gates-agent-mode.d.ts.map +1 -0
- package/dist/src/policy/gates-agent-mode.js +138 -0
- package/dist/src/policy/gates-agent-mode.js.map +1 -0
- package/dist/src/policy/gates-config-internal.d.ts +54 -0
- package/dist/src/policy/gates-config-internal.d.ts.map +1 -0
- package/dist/src/policy/gates-config-internal.js +108 -0
- package/dist/src/policy/gates-config-internal.js.map +1 -0
- package/dist/src/policy/gates-config.d.ts +67 -0
- package/dist/src/policy/gates-config.d.ts.map +1 -0
- package/dist/src/policy/gates-config.js +193 -0
- package/dist/src/policy/gates-config.js.map +1 -0
- package/dist/src/policy/gates-coverage.d.ts +48 -0
- package/dist/src/policy/gates-coverage.d.ts.map +1 -0
- package/dist/src/policy/gates-coverage.js +182 -0
- package/dist/src/policy/gates-coverage.js.map +1 -0
- package/dist/src/policy/gates-presets.d.ts +51 -0
- package/dist/src/policy/gates-presets.d.ts.map +1 -0
- package/dist/src/policy/gates-presets.js +117 -0
- package/dist/src/policy/gates-presets.js.map +1 -0
- package/dist/src/policy/gates-schemas.d.ts +142 -0
- package/dist/src/policy/gates-schemas.d.ts.map +1 -0
- package/dist/src/policy/gates-schemas.js +67 -0
- package/dist/src/policy/gates-schemas.js.map +1 -0
- package/dist/src/policy/index.d.ts +19 -0
- package/dist/src/policy/index.d.ts.map +1 -0
- package/dist/src/policy/index.js +21 -0
- package/dist/src/policy/index.js.map +1 -0
- package/dist/src/policy/package-manager-resolver.d.ts +79 -0
- package/dist/src/policy/package-manager-resolver.d.ts.map +1 -0
- package/dist/src/policy/package-manager-resolver.js +245 -0
- package/dist/src/policy/package-manager-resolver.js.map +1 -0
- package/dist/src/policy/resolve-policy.d.ts +337 -0
- package/dist/src/policy/resolve-policy.d.ts.map +1 -0
- package/dist/src/policy/resolve-policy.js +353 -0
- package/dist/src/policy/resolve-policy.js.map +1 -0
- package/dist/src/ports/config.ports.d.ts +83 -0
- package/dist/src/ports/config.ports.d.ts.map +1 -0
- package/dist/src/ports/config.ports.js +4 -0
- package/dist/src/ports/config.ports.js.map +1 -0
- package/dist/src/ports/dashboard-renderer.port.d.ts +113 -0
- package/dist/src/ports/dashboard-renderer.port.d.ts.map +1 -0
- package/dist/src/ports/dashboard-renderer.port.js +4 -0
- package/dist/src/ports/dashboard-renderer.port.js.map +1 -0
- package/dist/src/ports/index.d.ts +5 -0
- package/dist/src/ports/index.d.ts.map +1 -0
- package/dist/src/ports/index.js +10 -0
- package/dist/src/ports/index.js.map +1 -0
- package/dist/src/ports/sync-validator.ports.d.ts +52 -0
- package/dist/src/ports/sync-validator.ports.d.ts.map +1 -0
- package/dist/src/ports/sync-validator.ports.js +4 -0
- package/dist/src/ports/sync-validator.ports.js.map +1 -0
- package/dist/src/ports/wu-helpers.ports.d.ts +157 -0
- package/dist/src/ports/wu-helpers.ports.d.ts.map +1 -0
- package/dist/src/ports/wu-helpers.ports.js +4 -0
- package/dist/src/ports/wu-helpers.ports.js.map +1 -0
- package/dist/src/ports/wu-state.ports.d.ts +209 -0
- package/dist/src/ports/wu-state.ports.d.ts.map +1 -0
- package/dist/src/ports/wu-state.ports.js +4 -0
- package/dist/src/ports/wu-state.ports.js.map +1 -0
- package/dist/src/primitives/index.d.ts +2 -0
- package/dist/src/primitives/index.d.ts.map +1 -0
- package/dist/src/primitives/index.js +5 -0
- package/dist/src/primitives/index.js.map +1 -0
- package/dist/src/runtime/index.d.ts +2 -0
- package/dist/src/runtime/index.d.ts.map +1 -0
- package/dist/src/runtime/index.js +6 -0
- package/dist/src/runtime/index.js.map +1 -0
- package/dist/src/runtime/work-classifier.d.ts +103 -0
- package/dist/src/runtime/work-classifier.d.ts.map +1 -0
- package/dist/src/runtime/work-classifier.js +427 -0
- package/dist/src/runtime/work-classifier.js.map +1 -0
- package/dist/src/sandbox/index.d.ts +6 -0
- package/dist/src/sandbox/index.d.ts.map +1 -0
- package/dist/src/sandbox/index.js +10 -0
- package/dist/src/sandbox/index.js.map +1 -0
- package/dist/src/sandbox/sandbox-allowlist.d.ts +16 -0
- package/dist/src/sandbox/sandbox-allowlist.d.ts.map +1 -0
- package/dist/src/sandbox/sandbox-allowlist.js +77 -0
- package/dist/src/sandbox/sandbox-allowlist.js.map +1 -0
- package/dist/src/sandbox/sandbox-backend-linux.d.ts +6 -0
- package/dist/src/sandbox/sandbox-backend-linux.d.ts.map +1 -0
- package/dist/src/sandbox/sandbox-backend-linux.js +67 -0
- package/dist/src/sandbox/sandbox-backend-linux.js.map +1 -0
- package/dist/src/sandbox/sandbox-backend-macos.d.ts +6 -0
- package/dist/src/sandbox/sandbox-backend-macos.d.ts.map +1 -0
- package/dist/src/sandbox/sandbox-backend-macos.js +112 -0
- package/dist/src/sandbox/sandbox-backend-macos.js.map +1 -0
- package/dist/src/sandbox/sandbox-backend-windows.d.ts +6 -0
- package/dist/src/sandbox/sandbox-backend-windows.d.ts.map +1 -0
- package/dist/src/sandbox/sandbox-backend-windows.js +30 -0
- package/dist/src/sandbox/sandbox-backend-windows.js.map +1 -0
- package/dist/src/sandbox/sandbox-profile.d.ts +58 -0
- package/dist/src/sandbox/sandbox-profile.d.ts.map +1 -0
- package/dist/src/sandbox/sandbox-profile.js +69 -0
- package/dist/src/sandbox/sandbox-profile.js.map +1 -0
- package/dist/src/schemas/index.d.ts +2 -0
- package/dist/src/schemas/index.d.ts.map +1 -0
- package/dist/src/schemas/index.js +5 -0
- package/dist/src/schemas/index.js.map +1 -0
- package/dist/src/state/date-utils.d.ts +66 -0
- package/dist/src/state/date-utils.d.ts.map +1 -0
- package/dist/src/state/date-utils.js +143 -0
- package/dist/src/state/date-utils.js.map +1 -0
- package/dist/src/state/index.d.ts +8 -0
- package/dist/src/state/index.d.ts.map +1 -0
- package/dist/src/state/index.js +15 -0
- package/dist/src/state/index.js.map +1 -0
- package/dist/src/state/state-machine.d.ts +14 -0
- package/dist/src/state/state-machine.d.ts.map +1 -0
- package/dist/src/state/state-machine.js +92 -0
- package/dist/src/state/state-machine.js.map +1 -0
- package/dist/src/state/wu-doc-types.d.ts +48 -0
- package/dist/src/state/wu-doc-types.d.ts.map +1 -0
- package/dist/src/state/wu-doc-types.js +4 -0
- package/dist/src/state/wu-doc-types.js.map +1 -0
- package/dist/src/state/wu-paths.d.ts +275 -0
- package/dist/src/state/wu-paths.d.ts.map +1 -0
- package/dist/src/state/wu-paths.js +335 -0
- package/dist/src/state/wu-paths.js.map +1 -0
- package/dist/src/state/wu-schema.d.ts +831 -0
- package/dist/src/state/wu-schema.d.ts.map +1 -0
- package/dist/src/state/wu-schema.js +934 -0
- package/dist/src/state/wu-schema.js.map +1 -0
- package/dist/src/state/wu-state-schema.d.ts +292 -0
- package/dist/src/state/wu-state-schema.d.ts.map +1 -0
- package/dist/src/state/wu-state-schema.js +215 -0
- package/dist/src/state/wu-state-schema.js.map +1 -0
- package/dist/src/state/wu-yaml.d.ts +113 -0
- package/dist/src/state/wu-yaml.d.ts.map +1 -0
- package/dist/src/state/wu-yaml.js +307 -0
- package/dist/src/state/wu-yaml.js.map +1 -0
- package/dist/tool-impl/wu-lifecycle-tools.d.ts +11 -0
- package/dist/tool-impl/wu-lifecycle-tools.d.ts.map +1 -1
- package/dist/tool-impl/wu-lifecycle-tools.js +17 -0
- package/dist/tool-impl/wu-lifecycle-tools.js.map +1 -1
- package/manifest.yaml +46 -0
- package/package.json +88 -3
|
@@ -0,0 +1,831 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work Unit YAML Schema
|
|
3
|
+
*
|
|
4
|
+
* Zod schema for runtime validation of WU YAML structure.
|
|
5
|
+
* Provides compile-time type inference and semantic validation.
|
|
6
|
+
*
|
|
7
|
+
* Part of WU-1162: Add Zod schema validation to prevent placeholder WU completions
|
|
8
|
+
* Part of WU-1539: Add BaseWUSchema pattern for create/edit validation
|
|
9
|
+
*
|
|
10
|
+
* Schema Architecture (DRY pattern):
|
|
11
|
+
* - BaseWUSchema: Structural validation only (field types, formats, lengths)
|
|
12
|
+
* - WUSchema: Extends base + placeholder rejection (for wu:claim, wu:done)
|
|
13
|
+
* - ReadyWUSchema: Alias for BaseWUSchema (for wu:create, wu:edit)
|
|
14
|
+
*
|
|
15
|
+
* @see {@link packages/@lumenflow/cli/src/wu-done.ts} - Consumer (validates spec completeness, uses WUSchema)
|
|
16
|
+
* @see {@link packages/@lumenflow/cli/src/wu-claim.ts} - Consumer (validates spec completeness, uses WUSchema)
|
|
17
|
+
* @see {@link packages/@lumenflow/cli/src/wu-create.ts} - Consumer (structural validation, uses ReadyWUSchema)
|
|
18
|
+
* @see {@link packages/@lumenflow/cli/src/wu-edit.ts} - Consumer (structural validation, uses ReadyWUSchema)
|
|
19
|
+
* @see {@link packages/@lumenflow/cli/src/validate.ts} - Consumer (CI validation)
|
|
20
|
+
* @see {@link apps/web/src/lib/llm/schemas/orchestrator.ts} - Pattern reference
|
|
21
|
+
*/
|
|
22
|
+
import { z } from 'zod';
|
|
23
|
+
/**
|
|
24
|
+
* Placeholder sentinel constant
|
|
25
|
+
*
|
|
26
|
+
* Used in wu:create template generation and validation.
|
|
27
|
+
* Single source of truth for placeholder detection (DRY principle).
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // tools/wu-create.ts
|
|
31
|
+
* description: `${PLACEHOLDER_SENTINEL} Describe the work...`
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // tools/validate.ts
|
|
35
|
+
* if (doc.description.includes(PLACEHOLDER_SENTINEL)) { error(); }
|
|
36
|
+
*/
|
|
37
|
+
export declare const PLACEHOLDER_SENTINEL = "[PLACEHOLDER]";
|
|
38
|
+
interface WUDoneValidationInput {
|
|
39
|
+
type?: string;
|
|
40
|
+
code_paths?: string[];
|
|
41
|
+
}
|
|
42
|
+
interface WUEscalationInput {
|
|
43
|
+
id: string;
|
|
44
|
+
lane?: string;
|
|
45
|
+
code_paths?: string[];
|
|
46
|
+
priority?: string;
|
|
47
|
+
escalation_triggers?: string[];
|
|
48
|
+
requires_human_escalation?: boolean;
|
|
49
|
+
escalation_resolved_by?: string;
|
|
50
|
+
escalation_resolved_at?: string;
|
|
51
|
+
requires_cso_approval?: boolean;
|
|
52
|
+
requires_cto_approval?: boolean;
|
|
53
|
+
requires_design_approval?: boolean;
|
|
54
|
+
}
|
|
55
|
+
interface WUCompletenessInput {
|
|
56
|
+
id: string;
|
|
57
|
+
status?: string;
|
|
58
|
+
type?: string;
|
|
59
|
+
notes?: string;
|
|
60
|
+
tests?: {
|
|
61
|
+
manual?: string[];
|
|
62
|
+
};
|
|
63
|
+
spec_refs?: unknown;
|
|
64
|
+
}
|
|
65
|
+
type EscalationDetectionInput = Pick<WUEscalationInput, 'lane' | 'code_paths' | 'priority'>;
|
|
66
|
+
/**
|
|
67
|
+
* Base WU Schema (structural validation only)
|
|
68
|
+
*
|
|
69
|
+
* WU-1539: Used by wu:create and wu:edit for fail-fast structural validation.
|
|
70
|
+
* Allows placeholder markers - only checks field types, formats, and lengths.
|
|
71
|
+
*
|
|
72
|
+
* Use case: Validate WU structure at creation/edit time before placeholders are filled.
|
|
73
|
+
*/
|
|
74
|
+
export declare const BaseWUSchema: z.ZodObject<{
|
|
75
|
+
description: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
76
|
+
acceptance: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>]>;
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
title: z.ZodString;
|
|
79
|
+
lane: z.ZodString;
|
|
80
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
81
|
+
documentation: "documentation";
|
|
82
|
+
feature: "feature";
|
|
83
|
+
bug: "bug";
|
|
84
|
+
process: "process";
|
|
85
|
+
tooling: "tooling";
|
|
86
|
+
chore: "chore";
|
|
87
|
+
refactor: "refactor";
|
|
88
|
+
}>>;
|
|
89
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
90
|
+
in_progress: "in_progress";
|
|
91
|
+
todo: "todo";
|
|
92
|
+
ready: "ready";
|
|
93
|
+
backlog: "backlog";
|
|
94
|
+
blocked: "blocked";
|
|
95
|
+
done: "done";
|
|
96
|
+
completed: "completed";
|
|
97
|
+
cancelled: "cancelled";
|
|
98
|
+
abandoned: "abandoned";
|
|
99
|
+
deferred: "deferred";
|
|
100
|
+
closed: "closed";
|
|
101
|
+
superseded: "superseded";
|
|
102
|
+
}>>;
|
|
103
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
104
|
+
P2: "P2";
|
|
105
|
+
P0: "P0";
|
|
106
|
+
P1: "P1";
|
|
107
|
+
P3: "P3";
|
|
108
|
+
}>>;
|
|
109
|
+
created: z.ZodString;
|
|
110
|
+
code_paths: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
111
|
+
tests: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
112
|
+
manual: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
113
|
+
unit: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
114
|
+
integration: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
115
|
+
e2e: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
116
|
+
}, z.core.$strip>>>;
|
|
117
|
+
artifacts: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
118
|
+
dependencies: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
119
|
+
initiative: z.ZodOptional<z.ZodString>;
|
|
120
|
+
phase: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
blocks: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
122
|
+
blocked_by: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
123
|
+
labels: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
124
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
125
|
+
spec_refs: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
126
|
+
file: z.ZodOptional<z.ZodString>;
|
|
127
|
+
section: z.ZodString;
|
|
128
|
+
}, z.core.$strip>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
129
|
+
file: z.ZodOptional<z.ZodString>;
|
|
130
|
+
section: z.ZodString;
|
|
131
|
+
}, z.core.$strip>]>>]>>;
|
|
132
|
+
risks: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
133
|
+
notes: z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string, string | string[] | undefined>>;
|
|
134
|
+
requires_review: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
135
|
+
locked: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
completed_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
137
|
+
claimed_mode: z.ZodOptional<z.ZodEnum<{
|
|
138
|
+
worktree: "worktree";
|
|
139
|
+
"branch-only": "branch-only";
|
|
140
|
+
"worktree-pr": "worktree-pr";
|
|
141
|
+
"branch-pr": "branch-pr";
|
|
142
|
+
}>>;
|
|
143
|
+
claimed_branch: z.ZodOptional<z.ZodString>;
|
|
144
|
+
assigned_to: z.ZodOptional<z.ZodString>;
|
|
145
|
+
claimed_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
146
|
+
blocked_reason: z.ZodOptional<z.ZodString>;
|
|
147
|
+
worktree_path: z.ZodOptional<z.ZodString>;
|
|
148
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
149
|
+
agent_sessions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
150
|
+
session_id: z.ZodString;
|
|
151
|
+
started: z.ZodString;
|
|
152
|
+
completed: z.ZodOptional<z.ZodString>;
|
|
153
|
+
agent_type: z.ZodEnum<{
|
|
154
|
+
"claude-code": "claude-code";
|
|
155
|
+
"codex-cli": "codex-cli";
|
|
156
|
+
cursor: "cursor";
|
|
157
|
+
"gemini-cli": "gemini-cli";
|
|
158
|
+
windsurf: "windsurf";
|
|
159
|
+
copilot: "copilot";
|
|
160
|
+
other: "other";
|
|
161
|
+
}>;
|
|
162
|
+
context_tier: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
163
|
+
incidents_logged: z.ZodDefault<z.ZodNumber>;
|
|
164
|
+
incidents_major: z.ZodDefault<z.ZodNumber>;
|
|
165
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
}, z.core.$strip>>>;
|
|
167
|
+
exposure: z.ZodOptional<z.ZodEnum<{
|
|
168
|
+
ui: "ui";
|
|
169
|
+
api: "api";
|
|
170
|
+
"backend-only": "backend-only";
|
|
171
|
+
documentation: "documentation";
|
|
172
|
+
}>>;
|
|
173
|
+
user_journey: z.ZodOptional<z.ZodString>;
|
|
174
|
+
ui_pairing_wus: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
175
|
+
navigation_path: z.ZodOptional<z.ZodString>;
|
|
176
|
+
sizing_estimate: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
estimated_files: z.ZodNumber;
|
|
178
|
+
estimated_tool_calls: z.ZodNumber;
|
|
179
|
+
strategy: z.ZodEnum<{
|
|
180
|
+
"single-session": "single-session";
|
|
181
|
+
"checkpoint-resume": "checkpoint-resume";
|
|
182
|
+
"orchestrator-worker": "orchestrator-worker";
|
|
183
|
+
decomposition: "decomposition";
|
|
184
|
+
}>;
|
|
185
|
+
exception_type: z.ZodOptional<z.ZodEnum<{
|
|
186
|
+
"docs-only": "docs-only";
|
|
187
|
+
"shallow-multi-file": "shallow-multi-file";
|
|
188
|
+
}>>;
|
|
189
|
+
exception_reason: z.ZodOptional<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
escalation_triggers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
192
|
+
budget: "budget";
|
|
193
|
+
sensitive_data: "sensitive_data";
|
|
194
|
+
security_p0: "security_p0";
|
|
195
|
+
cross_lane_arch: "cross_lane_arch";
|
|
196
|
+
}>>>>;
|
|
197
|
+
requires_human_escalation: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
198
|
+
approved_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
199
|
+
approved_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
200
|
+
escalation_resolved_by: z.ZodOptional<z.ZodString>;
|
|
201
|
+
escalation_resolved_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
202
|
+
requires_cso_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
203
|
+
requires_cto_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
204
|
+
requires_design_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
/**
|
|
207
|
+
* Ready WU Schema (alias for BaseWUSchema)
|
|
208
|
+
*
|
|
209
|
+
* WU-1539: Semantic alias for clarity in wu:create and wu:edit.
|
|
210
|
+
* Same validation as BaseWUSchema - allows placeholders, enforces structure.
|
|
211
|
+
*/
|
|
212
|
+
export declare const ReadyWUSchema: z.ZodObject<{
|
|
213
|
+
description: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
214
|
+
acceptance: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>]>;
|
|
215
|
+
id: z.ZodString;
|
|
216
|
+
title: z.ZodString;
|
|
217
|
+
lane: z.ZodString;
|
|
218
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
219
|
+
documentation: "documentation";
|
|
220
|
+
feature: "feature";
|
|
221
|
+
bug: "bug";
|
|
222
|
+
process: "process";
|
|
223
|
+
tooling: "tooling";
|
|
224
|
+
chore: "chore";
|
|
225
|
+
refactor: "refactor";
|
|
226
|
+
}>>;
|
|
227
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
228
|
+
in_progress: "in_progress";
|
|
229
|
+
todo: "todo";
|
|
230
|
+
ready: "ready";
|
|
231
|
+
backlog: "backlog";
|
|
232
|
+
blocked: "blocked";
|
|
233
|
+
done: "done";
|
|
234
|
+
completed: "completed";
|
|
235
|
+
cancelled: "cancelled";
|
|
236
|
+
abandoned: "abandoned";
|
|
237
|
+
deferred: "deferred";
|
|
238
|
+
closed: "closed";
|
|
239
|
+
superseded: "superseded";
|
|
240
|
+
}>>;
|
|
241
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
242
|
+
P2: "P2";
|
|
243
|
+
P0: "P0";
|
|
244
|
+
P1: "P1";
|
|
245
|
+
P3: "P3";
|
|
246
|
+
}>>;
|
|
247
|
+
created: z.ZodString;
|
|
248
|
+
code_paths: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
249
|
+
tests: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
250
|
+
manual: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
251
|
+
unit: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
252
|
+
integration: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
253
|
+
e2e: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
254
|
+
}, z.core.$strip>>>;
|
|
255
|
+
artifacts: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
256
|
+
dependencies: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
257
|
+
initiative: z.ZodOptional<z.ZodString>;
|
|
258
|
+
phase: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
blocks: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
260
|
+
blocked_by: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
261
|
+
labels: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
262
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
263
|
+
spec_refs: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
264
|
+
file: z.ZodOptional<z.ZodString>;
|
|
265
|
+
section: z.ZodString;
|
|
266
|
+
}, z.core.$strip>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
267
|
+
file: z.ZodOptional<z.ZodString>;
|
|
268
|
+
section: z.ZodString;
|
|
269
|
+
}, z.core.$strip>]>>]>>;
|
|
270
|
+
risks: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
271
|
+
notes: z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string, string | string[] | undefined>>;
|
|
272
|
+
requires_review: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
273
|
+
locked: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
completed_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
275
|
+
claimed_mode: z.ZodOptional<z.ZodEnum<{
|
|
276
|
+
worktree: "worktree";
|
|
277
|
+
"branch-only": "branch-only";
|
|
278
|
+
"worktree-pr": "worktree-pr";
|
|
279
|
+
"branch-pr": "branch-pr";
|
|
280
|
+
}>>;
|
|
281
|
+
claimed_branch: z.ZodOptional<z.ZodString>;
|
|
282
|
+
assigned_to: z.ZodOptional<z.ZodString>;
|
|
283
|
+
claimed_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
284
|
+
blocked_reason: z.ZodOptional<z.ZodString>;
|
|
285
|
+
worktree_path: z.ZodOptional<z.ZodString>;
|
|
286
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
287
|
+
agent_sessions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
288
|
+
session_id: z.ZodString;
|
|
289
|
+
started: z.ZodString;
|
|
290
|
+
completed: z.ZodOptional<z.ZodString>;
|
|
291
|
+
agent_type: z.ZodEnum<{
|
|
292
|
+
"claude-code": "claude-code";
|
|
293
|
+
"codex-cli": "codex-cli";
|
|
294
|
+
cursor: "cursor";
|
|
295
|
+
"gemini-cli": "gemini-cli";
|
|
296
|
+
windsurf: "windsurf";
|
|
297
|
+
copilot: "copilot";
|
|
298
|
+
other: "other";
|
|
299
|
+
}>;
|
|
300
|
+
context_tier: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
301
|
+
incidents_logged: z.ZodDefault<z.ZodNumber>;
|
|
302
|
+
incidents_major: z.ZodDefault<z.ZodNumber>;
|
|
303
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
}, z.core.$strip>>>;
|
|
305
|
+
exposure: z.ZodOptional<z.ZodEnum<{
|
|
306
|
+
ui: "ui";
|
|
307
|
+
api: "api";
|
|
308
|
+
"backend-only": "backend-only";
|
|
309
|
+
documentation: "documentation";
|
|
310
|
+
}>>;
|
|
311
|
+
user_journey: z.ZodOptional<z.ZodString>;
|
|
312
|
+
ui_pairing_wus: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
313
|
+
navigation_path: z.ZodOptional<z.ZodString>;
|
|
314
|
+
sizing_estimate: z.ZodOptional<z.ZodObject<{
|
|
315
|
+
estimated_files: z.ZodNumber;
|
|
316
|
+
estimated_tool_calls: z.ZodNumber;
|
|
317
|
+
strategy: z.ZodEnum<{
|
|
318
|
+
"single-session": "single-session";
|
|
319
|
+
"checkpoint-resume": "checkpoint-resume";
|
|
320
|
+
"orchestrator-worker": "orchestrator-worker";
|
|
321
|
+
decomposition: "decomposition";
|
|
322
|
+
}>;
|
|
323
|
+
exception_type: z.ZodOptional<z.ZodEnum<{
|
|
324
|
+
"docs-only": "docs-only";
|
|
325
|
+
"shallow-multi-file": "shallow-multi-file";
|
|
326
|
+
}>>;
|
|
327
|
+
exception_reason: z.ZodOptional<z.ZodString>;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
escalation_triggers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
330
|
+
budget: "budget";
|
|
331
|
+
sensitive_data: "sensitive_data";
|
|
332
|
+
security_p0: "security_p0";
|
|
333
|
+
cross_lane_arch: "cross_lane_arch";
|
|
334
|
+
}>>>>;
|
|
335
|
+
requires_human_escalation: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
336
|
+
approved_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
337
|
+
approved_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
338
|
+
escalation_resolved_by: z.ZodOptional<z.ZodString>;
|
|
339
|
+
escalation_resolved_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
340
|
+
requires_cso_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
341
|
+
requires_cto_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
342
|
+
requires_design_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
/**
|
|
345
|
+
* Strict WU Schema (structural + placeholder rejection)
|
|
346
|
+
*
|
|
347
|
+
* Validates WU files against LumenFlow requirements:
|
|
348
|
+
* - No placeholder text in done WUs
|
|
349
|
+
* - Minimum description length (50 chars)
|
|
350
|
+
* - Code paths present for non-documentation WUs
|
|
351
|
+
* - Proper status/lane/type enums
|
|
352
|
+
*
|
|
353
|
+
* Used by wu:claim and wu:done to ensure specs are complete.
|
|
354
|
+
* Provides runtime validation and TypeScript type inference.
|
|
355
|
+
*/
|
|
356
|
+
export declare const WUSchema: z.ZodObject<{
|
|
357
|
+
description: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
358
|
+
acceptance: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>]>;
|
|
359
|
+
id: z.ZodString;
|
|
360
|
+
title: z.ZodString;
|
|
361
|
+
lane: z.ZodString;
|
|
362
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
363
|
+
documentation: "documentation";
|
|
364
|
+
feature: "feature";
|
|
365
|
+
bug: "bug";
|
|
366
|
+
process: "process";
|
|
367
|
+
tooling: "tooling";
|
|
368
|
+
chore: "chore";
|
|
369
|
+
refactor: "refactor";
|
|
370
|
+
}>>;
|
|
371
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
372
|
+
in_progress: "in_progress";
|
|
373
|
+
todo: "todo";
|
|
374
|
+
ready: "ready";
|
|
375
|
+
backlog: "backlog";
|
|
376
|
+
blocked: "blocked";
|
|
377
|
+
done: "done";
|
|
378
|
+
completed: "completed";
|
|
379
|
+
cancelled: "cancelled";
|
|
380
|
+
abandoned: "abandoned";
|
|
381
|
+
deferred: "deferred";
|
|
382
|
+
closed: "closed";
|
|
383
|
+
superseded: "superseded";
|
|
384
|
+
}>>;
|
|
385
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
386
|
+
P2: "P2";
|
|
387
|
+
P0: "P0";
|
|
388
|
+
P1: "P1";
|
|
389
|
+
P3: "P3";
|
|
390
|
+
}>>;
|
|
391
|
+
created: z.ZodString;
|
|
392
|
+
code_paths: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
393
|
+
tests: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
394
|
+
manual: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
395
|
+
unit: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
396
|
+
integration: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
397
|
+
e2e: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
398
|
+
}, z.core.$strip>>>;
|
|
399
|
+
artifacts: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
400
|
+
dependencies: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
401
|
+
initiative: z.ZodOptional<z.ZodString>;
|
|
402
|
+
phase: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
blocks: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
404
|
+
blocked_by: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
405
|
+
labels: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
406
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
407
|
+
spec_refs: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
408
|
+
file: z.ZodOptional<z.ZodString>;
|
|
409
|
+
section: z.ZodString;
|
|
410
|
+
}, z.core.$strip>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
411
|
+
file: z.ZodOptional<z.ZodString>;
|
|
412
|
+
section: z.ZodString;
|
|
413
|
+
}, z.core.$strip>]>>]>>;
|
|
414
|
+
risks: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>>;
|
|
415
|
+
notes: z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string, string | string[] | undefined>>;
|
|
416
|
+
requires_review: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
417
|
+
locked: z.ZodOptional<z.ZodBoolean>;
|
|
418
|
+
completed_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
419
|
+
claimed_mode: z.ZodOptional<z.ZodEnum<{
|
|
420
|
+
worktree: "worktree";
|
|
421
|
+
"branch-only": "branch-only";
|
|
422
|
+
"worktree-pr": "worktree-pr";
|
|
423
|
+
"branch-pr": "branch-pr";
|
|
424
|
+
}>>;
|
|
425
|
+
claimed_branch: z.ZodOptional<z.ZodString>;
|
|
426
|
+
assigned_to: z.ZodOptional<z.ZodString>;
|
|
427
|
+
claimed_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
428
|
+
blocked_reason: z.ZodOptional<z.ZodString>;
|
|
429
|
+
worktree_path: z.ZodOptional<z.ZodString>;
|
|
430
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
431
|
+
agent_sessions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
432
|
+
session_id: z.ZodString;
|
|
433
|
+
started: z.ZodString;
|
|
434
|
+
completed: z.ZodOptional<z.ZodString>;
|
|
435
|
+
agent_type: z.ZodEnum<{
|
|
436
|
+
"claude-code": "claude-code";
|
|
437
|
+
"codex-cli": "codex-cli";
|
|
438
|
+
cursor: "cursor";
|
|
439
|
+
"gemini-cli": "gemini-cli";
|
|
440
|
+
windsurf: "windsurf";
|
|
441
|
+
copilot: "copilot";
|
|
442
|
+
other: "other";
|
|
443
|
+
}>;
|
|
444
|
+
context_tier: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
445
|
+
incidents_logged: z.ZodDefault<z.ZodNumber>;
|
|
446
|
+
incidents_major: z.ZodDefault<z.ZodNumber>;
|
|
447
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
448
|
+
}, z.core.$strip>>>;
|
|
449
|
+
exposure: z.ZodOptional<z.ZodEnum<{
|
|
450
|
+
ui: "ui";
|
|
451
|
+
api: "api";
|
|
452
|
+
"backend-only": "backend-only";
|
|
453
|
+
documentation: "documentation";
|
|
454
|
+
}>>;
|
|
455
|
+
user_journey: z.ZodOptional<z.ZodString>;
|
|
456
|
+
ui_pairing_wus: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodArray<z.ZodString>>>;
|
|
457
|
+
navigation_path: z.ZodOptional<z.ZodString>;
|
|
458
|
+
sizing_estimate: z.ZodOptional<z.ZodObject<{
|
|
459
|
+
estimated_files: z.ZodNumber;
|
|
460
|
+
estimated_tool_calls: z.ZodNumber;
|
|
461
|
+
strategy: z.ZodEnum<{
|
|
462
|
+
"single-session": "single-session";
|
|
463
|
+
"checkpoint-resume": "checkpoint-resume";
|
|
464
|
+
"orchestrator-worker": "orchestrator-worker";
|
|
465
|
+
decomposition: "decomposition";
|
|
466
|
+
}>;
|
|
467
|
+
exception_type: z.ZodOptional<z.ZodEnum<{
|
|
468
|
+
"docs-only": "docs-only";
|
|
469
|
+
"shallow-multi-file": "shallow-multi-file";
|
|
470
|
+
}>>;
|
|
471
|
+
exception_reason: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>>;
|
|
473
|
+
escalation_triggers: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
474
|
+
budget: "budget";
|
|
475
|
+
sensitive_data: "sensitive_data";
|
|
476
|
+
security_p0: "security_p0";
|
|
477
|
+
cross_lane_arch: "cross_lane_arch";
|
|
478
|
+
}>>>>;
|
|
479
|
+
requires_human_escalation: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
480
|
+
approved_by: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
481
|
+
approved_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
482
|
+
escalation_resolved_by: z.ZodOptional<z.ZodString>;
|
|
483
|
+
escalation_resolved_at: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
484
|
+
requires_cso_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
485
|
+
requires_cto_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
486
|
+
requires_design_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
487
|
+
}, z.core.$strip>;
|
|
488
|
+
/**
|
|
489
|
+
* TypeScript type inferred from schema
|
|
490
|
+
*
|
|
491
|
+
* Single source of truth for both runtime validation and compile-time types.
|
|
492
|
+
* Replaces manual WU interfaces (DRY principle).
|
|
493
|
+
*
|
|
494
|
+
* Note: Type inference available in TypeScript via z.infer<typeof WUSchema>
|
|
495
|
+
* This is a JavaScript file, so the type export is not needed here.
|
|
496
|
+
*
|
|
497
|
+
* @typedef {import('zod').z.infer<typeof WUSchema>} WU
|
|
498
|
+
*/
|
|
499
|
+
/**
|
|
500
|
+
* Validates WU data against strict schema (placeholder rejection)
|
|
501
|
+
*
|
|
502
|
+
* Used by wu:claim and wu:done to ensure specs are complete.
|
|
503
|
+
* Rejects WUs with placeholder markers.
|
|
504
|
+
*
|
|
505
|
+
* @param {unknown} data - Parsed YAML data to validate
|
|
506
|
+
* @returns {z.SafeParseReturnType<WU, WU>} Validation result
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* const result = validateWU(yamlData);
|
|
510
|
+
* if (!result.success) {
|
|
511
|
+
* result.error.issues.forEach(issue => {
|
|
512
|
+
* console.error(`${issue.path.join('.')}: ${issue.message}`);
|
|
513
|
+
* });
|
|
514
|
+
* }
|
|
515
|
+
*/
|
|
516
|
+
export declare function validateWU(data: unknown): z.ZodSafeParseResult<{
|
|
517
|
+
description: string;
|
|
518
|
+
acceptance: string[] | Record<string, string[]>;
|
|
519
|
+
id: string;
|
|
520
|
+
title: string;
|
|
521
|
+
lane: string;
|
|
522
|
+
type: "documentation" | "feature" | "bug" | "process" | "tooling" | "chore" | "refactor";
|
|
523
|
+
status: "in_progress" | "todo" | "ready" | "backlog" | "blocked" | "done" | "completed" | "cancelled" | "abandoned" | "deferred" | "closed" | "superseded";
|
|
524
|
+
priority: "P2" | "P0" | "P1" | "P3";
|
|
525
|
+
created: string;
|
|
526
|
+
code_paths: string[];
|
|
527
|
+
tests: {
|
|
528
|
+
manual?: string[] | undefined;
|
|
529
|
+
unit?: string[] | undefined;
|
|
530
|
+
integration?: string[] | undefined;
|
|
531
|
+
e2e?: string[] | undefined;
|
|
532
|
+
};
|
|
533
|
+
artifacts: string[];
|
|
534
|
+
dependencies: string[];
|
|
535
|
+
risks: string[];
|
|
536
|
+
notes: string;
|
|
537
|
+
requires_review: boolean;
|
|
538
|
+
completed_at: string | undefined;
|
|
539
|
+
claimed_at: string | undefined;
|
|
540
|
+
escalation_triggers: ("budget" | "sensitive_data" | "security_p0" | "cross_lane_arch")[];
|
|
541
|
+
requires_human_escalation: boolean;
|
|
542
|
+
approved_at: string | undefined;
|
|
543
|
+
escalation_resolved_at: string | undefined;
|
|
544
|
+
requires_cso_approval: boolean;
|
|
545
|
+
requires_cto_approval: boolean;
|
|
546
|
+
requires_design_approval: boolean;
|
|
547
|
+
initiative?: string | undefined;
|
|
548
|
+
phase?: number | undefined;
|
|
549
|
+
blocks?: string[] | undefined;
|
|
550
|
+
blocked_by?: string[] | undefined;
|
|
551
|
+
labels?: string[] | undefined;
|
|
552
|
+
plan?: string | undefined;
|
|
553
|
+
spec_refs?: {
|
|
554
|
+
section: string;
|
|
555
|
+
file?: string | undefined;
|
|
556
|
+
} | (string | {
|
|
557
|
+
section: string;
|
|
558
|
+
file?: string | undefined;
|
|
559
|
+
})[] | undefined;
|
|
560
|
+
locked?: boolean | undefined;
|
|
561
|
+
claimed_mode?: "worktree" | "branch-only" | "worktree-pr" | "branch-pr" | undefined;
|
|
562
|
+
claimed_branch?: string | undefined;
|
|
563
|
+
assigned_to?: string | undefined;
|
|
564
|
+
blocked_reason?: string | undefined;
|
|
565
|
+
worktree_path?: string | undefined;
|
|
566
|
+
session_id?: string | undefined;
|
|
567
|
+
agent_sessions?: {
|
|
568
|
+
session_id: string;
|
|
569
|
+
started: string;
|
|
570
|
+
agent_type: "claude-code" | "codex-cli" | "cursor" | "gemini-cli" | "windsurf" | "copilot" | "other";
|
|
571
|
+
context_tier: 1 | 3 | 2;
|
|
572
|
+
incidents_logged: number;
|
|
573
|
+
incidents_major: number;
|
|
574
|
+
completed?: string | undefined;
|
|
575
|
+
artifacts?: string[] | undefined;
|
|
576
|
+
}[] | undefined;
|
|
577
|
+
exposure?: "ui" | "api" | "backend-only" | "documentation" | undefined;
|
|
578
|
+
user_journey?: string | undefined;
|
|
579
|
+
ui_pairing_wus?: string[] | undefined;
|
|
580
|
+
navigation_path?: string | undefined;
|
|
581
|
+
sizing_estimate?: {
|
|
582
|
+
estimated_files: number;
|
|
583
|
+
estimated_tool_calls: number;
|
|
584
|
+
strategy: "single-session" | "checkpoint-resume" | "orchestrator-worker" | "decomposition";
|
|
585
|
+
exception_type?: "docs-only" | "shallow-multi-file" | undefined;
|
|
586
|
+
exception_reason?: string | undefined;
|
|
587
|
+
} | undefined;
|
|
588
|
+
approved_by?: string[] | undefined;
|
|
589
|
+
escalation_resolved_by?: string | undefined;
|
|
590
|
+
}>;
|
|
591
|
+
/**
|
|
592
|
+
* Validates WU data against base schema (structural only)
|
|
593
|
+
*
|
|
594
|
+
* WU-1539: Used by wu:create and wu:edit for fail-fast structural validation.
|
|
595
|
+
* Allows placeholder markers - only checks field types, formats, and lengths.
|
|
596
|
+
*
|
|
597
|
+
* @param {unknown} data - Parsed YAML data to validate
|
|
598
|
+
* @returns {z.SafeParseReturnType<WU, WU>} Validation result
|
|
599
|
+
*
|
|
600
|
+
* @example
|
|
601
|
+
* const result = validateReadyWU(yamlData);
|
|
602
|
+
* if (!result.success) {
|
|
603
|
+
* const errors = result.error.issues
|
|
604
|
+
* .map(issue => ` • ${issue.path.join('.')}: ${issue.message}`)
|
|
605
|
+
* .join('\n');
|
|
606
|
+
* die(`WU YAML validation failed:\n\n${errors}`);
|
|
607
|
+
* }
|
|
608
|
+
*/
|
|
609
|
+
export declare function validateReadyWU(data: unknown): z.ZodSafeParseResult<{
|
|
610
|
+
description: string;
|
|
611
|
+
acceptance: string[] | Record<string, string[]>;
|
|
612
|
+
id: string;
|
|
613
|
+
title: string;
|
|
614
|
+
lane: string;
|
|
615
|
+
type: "documentation" | "feature" | "bug" | "process" | "tooling" | "chore" | "refactor";
|
|
616
|
+
status: "in_progress" | "todo" | "ready" | "backlog" | "blocked" | "done" | "completed" | "cancelled" | "abandoned" | "deferred" | "closed" | "superseded";
|
|
617
|
+
priority: "P2" | "P0" | "P1" | "P3";
|
|
618
|
+
created: string;
|
|
619
|
+
code_paths: string[];
|
|
620
|
+
tests: {
|
|
621
|
+
manual?: string[] | undefined;
|
|
622
|
+
unit?: string[] | undefined;
|
|
623
|
+
integration?: string[] | undefined;
|
|
624
|
+
e2e?: string[] | undefined;
|
|
625
|
+
};
|
|
626
|
+
artifacts: string[];
|
|
627
|
+
dependencies: string[];
|
|
628
|
+
risks: string[];
|
|
629
|
+
notes: string;
|
|
630
|
+
requires_review: boolean;
|
|
631
|
+
completed_at: string | undefined;
|
|
632
|
+
claimed_at: string | undefined;
|
|
633
|
+
escalation_triggers: ("budget" | "sensitive_data" | "security_p0" | "cross_lane_arch")[];
|
|
634
|
+
requires_human_escalation: boolean;
|
|
635
|
+
approved_at: string | undefined;
|
|
636
|
+
escalation_resolved_at: string | undefined;
|
|
637
|
+
requires_cso_approval: boolean;
|
|
638
|
+
requires_cto_approval: boolean;
|
|
639
|
+
requires_design_approval: boolean;
|
|
640
|
+
initiative?: string | undefined;
|
|
641
|
+
phase?: number | undefined;
|
|
642
|
+
blocks?: string[] | undefined;
|
|
643
|
+
blocked_by?: string[] | undefined;
|
|
644
|
+
labels?: string[] | undefined;
|
|
645
|
+
plan?: string | undefined;
|
|
646
|
+
spec_refs?: {
|
|
647
|
+
section: string;
|
|
648
|
+
file?: string | undefined;
|
|
649
|
+
} | (string | {
|
|
650
|
+
section: string;
|
|
651
|
+
file?: string | undefined;
|
|
652
|
+
})[] | undefined;
|
|
653
|
+
locked?: boolean | undefined;
|
|
654
|
+
claimed_mode?: "worktree" | "branch-only" | "worktree-pr" | "branch-pr" | undefined;
|
|
655
|
+
claimed_branch?: string | undefined;
|
|
656
|
+
assigned_to?: string | undefined;
|
|
657
|
+
blocked_reason?: string | undefined;
|
|
658
|
+
worktree_path?: string | undefined;
|
|
659
|
+
session_id?: string | undefined;
|
|
660
|
+
agent_sessions?: {
|
|
661
|
+
session_id: string;
|
|
662
|
+
started: string;
|
|
663
|
+
agent_type: "claude-code" | "codex-cli" | "cursor" | "gemini-cli" | "windsurf" | "copilot" | "other";
|
|
664
|
+
context_tier: 1 | 3 | 2;
|
|
665
|
+
incidents_logged: number;
|
|
666
|
+
incidents_major: number;
|
|
667
|
+
completed?: string | undefined;
|
|
668
|
+
artifacts?: string[] | undefined;
|
|
669
|
+
}[] | undefined;
|
|
670
|
+
exposure?: "ui" | "api" | "backend-only" | "documentation" | undefined;
|
|
671
|
+
user_journey?: string | undefined;
|
|
672
|
+
ui_pairing_wus?: string[] | undefined;
|
|
673
|
+
navigation_path?: string | undefined;
|
|
674
|
+
sizing_estimate?: {
|
|
675
|
+
estimated_files: number;
|
|
676
|
+
estimated_tool_calls: number;
|
|
677
|
+
strategy: "single-session" | "checkpoint-resume" | "orchestrator-worker" | "decomposition";
|
|
678
|
+
exception_type?: "docs-only" | "shallow-multi-file" | undefined;
|
|
679
|
+
exception_reason?: string | undefined;
|
|
680
|
+
} | undefined;
|
|
681
|
+
approved_by?: string[] | undefined;
|
|
682
|
+
escalation_resolved_by?: string | undefined;
|
|
683
|
+
}>;
|
|
684
|
+
/**
|
|
685
|
+
* Validates WU spec completeness for done status
|
|
686
|
+
*
|
|
687
|
+
* Additional validation beyond schema for WUs marked as done:
|
|
688
|
+
* - Code paths required for non-documentation WUs
|
|
689
|
+
* - Locked must be true
|
|
690
|
+
* - Completed timestamp must be present
|
|
691
|
+
*
|
|
692
|
+
* @param {WU} wu - Validated WU data
|
|
693
|
+
* @returns {{valid: boolean, errors: string[]}} Validation result
|
|
694
|
+
*
|
|
695
|
+
* @example
|
|
696
|
+
* const schemaResult = validateWU(data);
|
|
697
|
+
* if (schemaResult.success && data.status === 'done') {
|
|
698
|
+
* const completenessResult = validateDoneWU(schemaResult.data);
|
|
699
|
+
* if (!completenessResult.valid) {
|
|
700
|
+
* console.error(completenessResult.errors);
|
|
701
|
+
* }
|
|
702
|
+
* }
|
|
703
|
+
*/
|
|
704
|
+
export declare function validateDoneWU(wu: WUDoneValidationInput): {
|
|
705
|
+
valid: boolean;
|
|
706
|
+
errors: string[];
|
|
707
|
+
};
|
|
708
|
+
/**
|
|
709
|
+
* WU-2080: Valid escalation trigger types
|
|
710
|
+
*
|
|
711
|
+
* These are the only conditions that require human intervention.
|
|
712
|
+
* Everything else is auto-approved by agents.
|
|
713
|
+
*/
|
|
714
|
+
export declare const ESCALATION_TRIGGER_TYPES: string[];
|
|
715
|
+
/**
|
|
716
|
+
* WU-2080: Agent-first approval validation
|
|
717
|
+
*
|
|
718
|
+
* AGENT-FIRST MODEL: Agents auto-approve by default.
|
|
719
|
+
* Human escalation only when escalation_triggers is non-empty
|
|
720
|
+
* AND requires_human_escalation is true AND not yet resolved.
|
|
721
|
+
*
|
|
722
|
+
* Returns:
|
|
723
|
+
* - valid: true if agent can proceed (no unresolved escalation)
|
|
724
|
+
* - errors: blocking issues requiring human resolution
|
|
725
|
+
* - warnings: advisory messages (non-blocking)
|
|
726
|
+
*
|
|
727
|
+
* @param {object} wu - Validated WU data
|
|
728
|
+
* @returns {{valid: boolean, errors: string[], warnings: string[]}}
|
|
729
|
+
*/
|
|
730
|
+
export declare function validateApprovalGates(wu: WUEscalationInput): {
|
|
731
|
+
valid: boolean;
|
|
732
|
+
errors: string[];
|
|
733
|
+
warnings: string[];
|
|
734
|
+
};
|
|
735
|
+
/**
|
|
736
|
+
* WU-2080: Detect escalation triggers from WU content
|
|
737
|
+
*
|
|
738
|
+
* Analyzes WU metadata to detect conditions requiring human escalation.
|
|
739
|
+
* Called by wu:claim to auto-set escalation_triggers.
|
|
740
|
+
*
|
|
741
|
+
* @param {object} wu - WU data with lane, type, code_paths
|
|
742
|
+
* @returns {string[]} Array of triggered escalation types
|
|
743
|
+
*/
|
|
744
|
+
export declare function detectEscalationTriggers(wu: EscalationDetectionInput): string[];
|
|
745
|
+
/**
|
|
746
|
+
* WU-2080: Generate auto-approval metadata for wu:claim
|
|
747
|
+
*
|
|
748
|
+
* Called by wu:claim to auto-approve agents within policy.
|
|
749
|
+
* Sets approved_by and approved_at, detects escalation triggers.
|
|
750
|
+
*
|
|
751
|
+
* @param {object} wu - WU data
|
|
752
|
+
* @param {string} agentEmail - Email of claiming agent
|
|
753
|
+
* @returns {{approved_by: string[], approved_at: string, escalation_triggers: string[], requires_human_escalation: boolean}}
|
|
754
|
+
*/
|
|
755
|
+
export declare function generateAutoApproval(wu: EscalationDetectionInput, agentEmail: string): {
|
|
756
|
+
approved_by: string[];
|
|
757
|
+
approved_at: string;
|
|
758
|
+
escalation_triggers: string[];
|
|
759
|
+
requires_human_escalation: boolean;
|
|
760
|
+
};
|
|
761
|
+
/**
|
|
762
|
+
* @deprecated Use detectEscalationTriggers instead
|
|
763
|
+
* WU-2079: Legacy function for backwards compatibility
|
|
764
|
+
*/
|
|
765
|
+
export declare function determineRequiredApprovals(wu: EscalationDetectionInput): {
|
|
766
|
+
requires_cso_approval: boolean;
|
|
767
|
+
requires_cto_approval: boolean;
|
|
768
|
+
requires_design_approval: boolean;
|
|
769
|
+
};
|
|
770
|
+
/**
|
|
771
|
+
* WU-1811: Validates and normalizes WU YAML data with auto-fixable normalisations
|
|
772
|
+
*
|
|
773
|
+
* This function validates the WU YAML schema and applies fixable normalisations:
|
|
774
|
+
* - Trimming whitespace from string fields
|
|
775
|
+
* - Normalizing escaped newlines (\\n → \n)
|
|
776
|
+
* - Splitting embedded newlines in arrays (["a\nb"] → ["a", "b"])
|
|
777
|
+
*
|
|
778
|
+
* Returns:
|
|
779
|
+
* - valid: true if schema validation passes (after normalisations)
|
|
780
|
+
* - normalized: the normalized data (even if validation fails, partial normalization is returned)
|
|
781
|
+
* - errors: validation errors if UnsafeAny
|
|
782
|
+
* - wasNormalized: true if UnsafeAny normalisations were applied
|
|
783
|
+
*
|
|
784
|
+
* @param {unknown} data - Parsed YAML data to validate and normalize
|
|
785
|
+
* @returns {{valid: boolean, normalized: object|null, errors: string[], wasNormalized: boolean}}
|
|
786
|
+
*
|
|
787
|
+
* @example
|
|
788
|
+
* const { valid, normalized, errors, wasNormalized } = validateAndNormalizeWUYAML(yamlData);
|
|
789
|
+
* if (valid && wasNormalized) {
|
|
790
|
+
* // Write normalized data back to YAML file
|
|
791
|
+
* writeWU(wuPath, normalized);
|
|
792
|
+
* }
|
|
793
|
+
* if (!valid) {
|
|
794
|
+
* die(`Validation failed:\n${errors.join('\n')}`);
|
|
795
|
+
* }
|
|
796
|
+
*/
|
|
797
|
+
export declare function validateAndNormalizeWUYAML(data: unknown): {
|
|
798
|
+
valid: boolean;
|
|
799
|
+
normalized: z.infer<typeof WUSchema> | null;
|
|
800
|
+
errors: string[];
|
|
801
|
+
wasNormalized: boolean;
|
|
802
|
+
};
|
|
803
|
+
/**
|
|
804
|
+
* WU-1833: Validate WU spec completeness with advisory warnings
|
|
805
|
+
*
|
|
806
|
+
* Provides soft validation that warns (doesn't fail) when recommended fields are missing.
|
|
807
|
+
* Used by wu:validate command to surface quality issues without blocking workflow.
|
|
808
|
+
*
|
|
809
|
+
* Feature and bug WUs should have:
|
|
810
|
+
* - notes (implementation context, deployment instructions)
|
|
811
|
+
* - tests.manual (verification steps)
|
|
812
|
+
* - spec_refs (links to plans, design docs) - for features only
|
|
813
|
+
*
|
|
814
|
+
* @param {object} wu - Validated WU data (must pass WUSchema first)
|
|
815
|
+
* @returns {{warnings: string[]}} Array of warning messages
|
|
816
|
+
*
|
|
817
|
+
* @example
|
|
818
|
+
* const schemaResult = validateWU(data);
|
|
819
|
+
* if (schemaResult.success) {
|
|
820
|
+
* const { warnings } = validateWUCompleteness(schemaResult.data);
|
|
821
|
+
* if (warnings.length > 0) {
|
|
822
|
+
* console.warn('Quality warnings:');
|
|
823
|
+
* warnings.forEach(w => console.warn(` ⚠️ ${w}`));
|
|
824
|
+
* }
|
|
825
|
+
* }
|
|
826
|
+
*/
|
|
827
|
+
export declare function validateWUCompleteness(wu: WUCompletenessInput): {
|
|
828
|
+
warnings: string[];
|
|
829
|
+
};
|
|
830
|
+
export {};
|
|
831
|
+
//# sourceMappingURL=wu-schema.d.ts.map
|