@lumenflow/core 1.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/LICENSE +190 -0
- package/README.md +119 -0
- package/dist/active-wu-detector.d.ts +33 -0
- package/dist/active-wu-detector.js +106 -0
- package/dist/adapters/filesystem-metrics.adapter.d.ts +108 -0
- package/dist/adapters/filesystem-metrics.adapter.js +519 -0
- package/dist/adapters/terminal-renderer.adapter.d.ts +106 -0
- package/dist/adapters/terminal-renderer.adapter.js +337 -0
- package/dist/arg-parser.d.ts +63 -0
- package/dist/arg-parser.js +560 -0
- package/dist/backlog-editor.d.ts +98 -0
- package/dist/backlog-editor.js +179 -0
- package/dist/backlog-generator.d.ts +111 -0
- package/dist/backlog-generator.js +381 -0
- package/dist/backlog-parser.d.ts +45 -0
- package/dist/backlog-parser.js +102 -0
- package/dist/backlog-sync-validator.d.ts +78 -0
- package/dist/backlog-sync-validator.js +294 -0
- package/dist/branch-drift.d.ts +34 -0
- package/dist/branch-drift.js +51 -0
- package/dist/cleanup-install-config.d.ts +33 -0
- package/dist/cleanup-install-config.js +37 -0
- package/dist/cleanup-lock.d.ts +139 -0
- package/dist/cleanup-lock.js +313 -0
- package/dist/code-path-validator.d.ts +146 -0
- package/dist/code-path-validator.js +537 -0
- package/dist/code-paths-overlap.d.ts +55 -0
- package/dist/code-paths-overlap.js +245 -0
- package/dist/commands-logger.d.ts +77 -0
- package/dist/commands-logger.js +254 -0
- package/dist/commit-message-utils.d.ts +25 -0
- package/dist/commit-message-utils.js +41 -0
- package/dist/compliance-parser.d.ts +150 -0
- package/dist/compliance-parser.js +507 -0
- package/dist/constants/backlog-patterns.d.ts +20 -0
- package/dist/constants/backlog-patterns.js +23 -0
- package/dist/constants/dora-constants.d.ts +49 -0
- package/dist/constants/dora-constants.js +53 -0
- package/dist/constants/gate-constants.d.ts +15 -0
- package/dist/constants/gate-constants.js +15 -0
- package/dist/constants/linter-constants.d.ts +16 -0
- package/dist/constants/linter-constants.js +16 -0
- package/dist/constants/tokenizer-constants.d.ts +15 -0
- package/dist/constants/tokenizer-constants.js +15 -0
- package/dist/core/scope-checker.d.ts +97 -0
- package/dist/core/scope-checker.js +163 -0
- package/dist/core/tool-runner.d.ts +161 -0
- package/dist/core/tool-runner.js +393 -0
- package/dist/core/tool.constants.d.ts +105 -0
- package/dist/core/tool.constants.js +101 -0
- package/dist/core/tool.schemas.d.ts +226 -0
- package/dist/core/tool.schemas.js +226 -0
- package/dist/core/worktree-guard.d.ts +130 -0
- package/dist/core/worktree-guard.js +242 -0
- package/dist/coverage-gate.d.ts +108 -0
- package/dist/coverage-gate.js +196 -0
- package/dist/date-utils.d.ts +75 -0
- package/dist/date-utils.js +140 -0
- package/dist/dependency-graph.d.ts +142 -0
- package/dist/dependency-graph.js +550 -0
- package/dist/dependency-guard.d.ts +54 -0
- package/dist/dependency-guard.js +142 -0
- package/dist/dependency-validator.d.ts +105 -0
- package/dist/dependency-validator.js +154 -0
- package/dist/docs-path-validator.d.ts +36 -0
- package/dist/docs-path-validator.js +95 -0
- package/dist/domain/orchestration.constants.d.ts +99 -0
- package/dist/domain/orchestration.constants.js +97 -0
- package/dist/domain/orchestration.schemas.d.ts +280 -0
- package/dist/domain/orchestration.schemas.js +211 -0
- package/dist/domain/orchestration.types.d.ts +133 -0
- package/dist/domain/orchestration.types.js +12 -0
- package/dist/error-handler.d.ts +116 -0
- package/dist/error-handler.js +136 -0
- package/dist/file-classifiers.d.ts +62 -0
- package/dist/file-classifiers.js +108 -0
- package/dist/gates-agent-mode.d.ts +81 -0
- package/dist/gates-agent-mode.js +94 -0
- package/dist/generate-traceability.d.ts +107 -0
- package/dist/generate-traceability.js +411 -0
- package/dist/git-adapter.d.ts +395 -0
- package/dist/git-adapter.js +649 -0
- package/dist/git-staged-validator.d.ts +32 -0
- package/dist/git-staged-validator.js +48 -0
- package/dist/hardcoded-strings.d.ts +61 -0
- package/dist/hardcoded-strings.js +270 -0
- package/dist/incremental-lint.d.ts +78 -0
- package/dist/incremental-lint.js +129 -0
- package/dist/incremental-test.d.ts +39 -0
- package/dist/incremental-test.js +61 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +61 -0
- package/dist/invariants/check-automated-tests.d.ts +50 -0
- package/dist/invariants/check-automated-tests.js +166 -0
- package/dist/invariants-runner.d.ts +103 -0
- package/dist/invariants-runner.js +527 -0
- package/dist/lane-checker.d.ts +50 -0
- package/dist/lane-checker.js +319 -0
- package/dist/lane-inference.d.ts +39 -0
- package/dist/lane-inference.js +195 -0
- package/dist/lane-lock.d.ts +211 -0
- package/dist/lane-lock.js +474 -0
- package/dist/lane-validator.d.ts +48 -0
- package/dist/lane-validator.js +114 -0
- package/dist/logs-lib.d.ts +104 -0
- package/dist/logs-lib.js +207 -0
- package/dist/lumenflow-config-schema.d.ts +272 -0
- package/dist/lumenflow-config-schema.js +207 -0
- package/dist/lumenflow-config.d.ts +95 -0
- package/dist/lumenflow-config.js +236 -0
- package/dist/manual-test-validator.d.ts +80 -0
- package/dist/manual-test-validator.js +200 -0
- package/dist/merge-lock.d.ts +115 -0
- package/dist/merge-lock.js +251 -0
- package/dist/micro-worktree.d.ts +159 -0
- package/dist/micro-worktree.js +427 -0
- package/dist/migration-deployer.d.ts +69 -0
- package/dist/migration-deployer.js +151 -0
- package/dist/orchestration-advisory-loader.d.ts +28 -0
- package/dist/orchestration-advisory-loader.js +87 -0
- package/dist/orchestration-advisory.d.ts +58 -0
- package/dist/orchestration-advisory.js +94 -0
- package/dist/orchestration-di.d.ts +48 -0
- package/dist/orchestration-di.js +57 -0
- package/dist/orchestration-rules.d.ts +57 -0
- package/dist/orchestration-rules.js +201 -0
- package/dist/orphan-detector.d.ts +131 -0
- package/dist/orphan-detector.js +226 -0
- package/dist/path-classifiers.d.ts +57 -0
- package/dist/path-classifiers.js +93 -0
- package/dist/piped-command-detector.d.ts +34 -0
- package/dist/piped-command-detector.js +64 -0
- package/dist/ports/dashboard-renderer.port.d.ts +112 -0
- package/dist/ports/dashboard-renderer.port.js +25 -0
- package/dist/ports/metrics-collector.port.d.ts +132 -0
- package/dist/ports/metrics-collector.port.js +26 -0
- package/dist/process-detector.d.ts +84 -0
- package/dist/process-detector.js +172 -0
- package/dist/prompt-linter.d.ts +72 -0
- package/dist/prompt-linter.js +312 -0
- package/dist/prompt-monitor.d.ts +15 -0
- package/dist/prompt-monitor.js +205 -0
- package/dist/rebase-artifact-cleanup.d.ts +145 -0
- package/dist/rebase-artifact-cleanup.js +433 -0
- package/dist/retry-strategy.d.ts +189 -0
- package/dist/retry-strategy.js +283 -0
- package/dist/risk-detector.d.ts +108 -0
- package/dist/risk-detector.js +252 -0
- package/dist/rollback-utils.d.ts +76 -0
- package/dist/rollback-utils.js +104 -0
- package/dist/section-headings.d.ts +43 -0
- package/dist/section-headings.js +49 -0
- package/dist/spawn-escalation.d.ts +90 -0
- package/dist/spawn-escalation.js +253 -0
- package/dist/spawn-monitor.d.ts +229 -0
- package/dist/spawn-monitor.js +672 -0
- package/dist/spawn-recovery.d.ts +82 -0
- package/dist/spawn-recovery.js +298 -0
- package/dist/spawn-registry-schema.d.ts +98 -0
- package/dist/spawn-registry-schema.js +108 -0
- package/dist/spawn-registry-store.d.ts +146 -0
- package/dist/spawn-registry-store.js +273 -0
- package/dist/spawn-tree.d.ts +121 -0
- package/dist/spawn-tree.js +285 -0
- package/dist/stamp-status-validator.d.ts +84 -0
- package/dist/stamp-status-validator.js +134 -0
- package/dist/stamp-utils.d.ts +100 -0
- package/dist/stamp-utils.js +229 -0
- package/dist/state-machine.d.ts +26 -0
- package/dist/state-machine.js +83 -0
- package/dist/system-map-validator.d.ts +80 -0
- package/dist/system-map-validator.js +272 -0
- package/dist/telemetry.d.ts +80 -0
- package/dist/telemetry.js +213 -0
- package/dist/token-counter.d.ts +51 -0
- package/dist/token-counter.js +145 -0
- package/dist/usecases/get-dashboard-data.usecase.d.ts +52 -0
- package/dist/usecases/get-dashboard-data.usecase.js +61 -0
- package/dist/usecases/get-suggestions.usecase.d.ts +100 -0
- package/dist/usecases/get-suggestions.usecase.js +153 -0
- package/dist/user-normalizer.d.ts +41 -0
- package/dist/user-normalizer.js +141 -0
- package/dist/validators/phi-constants.d.ts +97 -0
- package/dist/validators/phi-constants.js +152 -0
- package/dist/validators/phi-scanner.d.ts +58 -0
- package/dist/validators/phi-scanner.js +215 -0
- package/dist/worktree-ownership.d.ts +50 -0
- package/dist/worktree-ownership.js +74 -0
- package/dist/worktree-scanner.d.ts +103 -0
- package/dist/worktree-scanner.js +168 -0
- package/dist/worktree-symlink.d.ts +99 -0
- package/dist/worktree-symlink.js +359 -0
- package/dist/wu-backlog-updater.d.ts +17 -0
- package/dist/wu-backlog-updater.js +37 -0
- package/dist/wu-checkpoint.d.ts +124 -0
- package/dist/wu-checkpoint.js +233 -0
- package/dist/wu-claim-helpers.d.ts +26 -0
- package/dist/wu-claim-helpers.js +63 -0
- package/dist/wu-claim-resume.d.ts +106 -0
- package/dist/wu-claim-resume.js +276 -0
- package/dist/wu-consistency-checker.d.ts +95 -0
- package/dist/wu-consistency-checker.js +567 -0
- package/dist/wu-constants.d.ts +1275 -0
- package/dist/wu-constants.js +1382 -0
- package/dist/wu-create-validators.d.ts +42 -0
- package/dist/wu-create-validators.js +93 -0
- package/dist/wu-done-branch-only.d.ts +63 -0
- package/dist/wu-done-branch-only.js +191 -0
- package/dist/wu-done-messages.d.ts +119 -0
- package/dist/wu-done-messages.js +185 -0
- package/dist/wu-done-pr.d.ts +72 -0
- package/dist/wu-done-pr.js +174 -0
- package/dist/wu-done-retry-helpers.d.ts +85 -0
- package/dist/wu-done-retry-helpers.js +172 -0
- package/dist/wu-done-ui.d.ts +37 -0
- package/dist/wu-done-ui.js +69 -0
- package/dist/wu-done-validators.d.ts +411 -0
- package/dist/wu-done-validators.js +1229 -0
- package/dist/wu-done-worktree.d.ts +182 -0
- package/dist/wu-done-worktree.js +1097 -0
- package/dist/wu-helpers.d.ts +128 -0
- package/dist/wu-helpers.js +248 -0
- package/dist/wu-lint.d.ts +70 -0
- package/dist/wu-lint.js +234 -0
- package/dist/wu-paths.d.ts +171 -0
- package/dist/wu-paths.js +178 -0
- package/dist/wu-preflight-validators.d.ts +86 -0
- package/dist/wu-preflight-validators.js +251 -0
- package/dist/wu-recovery.d.ts +138 -0
- package/dist/wu-recovery.js +341 -0
- package/dist/wu-repair-core.d.ts +131 -0
- package/dist/wu-repair-core.js +669 -0
- package/dist/wu-schema-normalization.d.ts +17 -0
- package/dist/wu-schema-normalization.js +82 -0
- package/dist/wu-schema.d.ts +793 -0
- package/dist/wu-schema.js +881 -0
- package/dist/wu-spawn-helpers.d.ts +121 -0
- package/dist/wu-spawn-helpers.js +271 -0
- package/dist/wu-spawn.d.ts +158 -0
- package/dist/wu-spawn.js +1306 -0
- package/dist/wu-state-schema.d.ts +213 -0
- package/dist/wu-state-schema.js +156 -0
- package/dist/wu-state-store.d.ts +264 -0
- package/dist/wu-state-store.js +691 -0
- package/dist/wu-status-transition.d.ts +63 -0
- package/dist/wu-status-transition.js +382 -0
- package/dist/wu-status-updater.d.ts +25 -0
- package/dist/wu-status-updater.js +116 -0
- package/dist/wu-transaction-collectors.d.ts +116 -0
- package/dist/wu-transaction-collectors.js +272 -0
- package/dist/wu-transaction.d.ts +170 -0
- package/dist/wu-transaction.js +273 -0
- package/dist/wu-validation-constants.d.ts +60 -0
- package/dist/wu-validation-constants.js +66 -0
- package/dist/wu-validation.d.ts +118 -0
- package/dist/wu-validation.js +243 -0
- package/dist/wu-validator.d.ts +62 -0
- package/dist/wu-validator.js +325 -0
- package/dist/wu-yaml-fixer.d.ts +97 -0
- package/dist/wu-yaml-fixer.js +264 -0
- package/dist/wu-yaml.d.ts +86 -0
- package/dist/wu-yaml.js +222 -0
- package/package.json +114 -0
|
@@ -0,0 +1,1275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work Unit Constants
|
|
3
|
+
*
|
|
4
|
+
* Centralized constants for wu- scripts to ensure consistency and DRY compliance.
|
|
5
|
+
* Single source of truth for magic strings, section headings, and patterns.
|
|
6
|
+
*
|
|
7
|
+
* Part of WU-1214: Extract hardcoded strings to wu-constants.mjs
|
|
8
|
+
* Part of WU-1240: Consolidated toKebab using change-case library
|
|
9
|
+
*
|
|
10
|
+
* @see {@link tools/wu-done.mjs} - Primary consumer
|
|
11
|
+
* @see {@link tools/wu-claim.mjs} - Branch/worktree creation
|
|
12
|
+
* @see {@link tools/lib/wu-schema.mjs} - PLACEHOLDER_SENTINEL (already centralized)
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Git branch names
|
|
16
|
+
*/
|
|
17
|
+
export declare const BRANCHES: {
|
|
18
|
+
MAIN: string;
|
|
19
|
+
MASTER: string;
|
|
20
|
+
/** Temporary branch prefix for micro-worktree operations */
|
|
21
|
+
TEMP_PREFIX: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Git remote names
|
|
25
|
+
*
|
|
26
|
+
* WU-1302: Centralized to eliminate hardcoded 'origin' strings
|
|
27
|
+
*/
|
|
28
|
+
export declare const REMOTES: {
|
|
29
|
+
ORIGIN: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Git ref construction helpers
|
|
33
|
+
*
|
|
34
|
+
* Centralized to eliminate hardcoded 'origin/main' strings
|
|
35
|
+
*/
|
|
36
|
+
export declare const GIT_REFS: {
|
|
37
|
+
/** Construct remote ref like 'origin/main' */
|
|
38
|
+
remote: (remoteName: any, branchName: any) => string;
|
|
39
|
+
/** Shortcut for origin/main */
|
|
40
|
+
ORIGIN_MAIN: string;
|
|
41
|
+
/** Current HEAD ref */
|
|
42
|
+
HEAD: string;
|
|
43
|
+
/** Fetch head ref */
|
|
44
|
+
FETCH_HEAD: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* WU status values
|
|
48
|
+
*
|
|
49
|
+
* Centralized status strings to avoid magic strings in wu-* scripts.
|
|
50
|
+
* Includes both canonical statuses and legacy variants found in YAML files.
|
|
51
|
+
*/
|
|
52
|
+
export declare const WU_STATUS: {
|
|
53
|
+
TODO: string;
|
|
54
|
+
READY: string;
|
|
55
|
+
BACKLOG: string;
|
|
56
|
+
IN_PROGRESS: string;
|
|
57
|
+
BLOCKED: string;
|
|
58
|
+
DONE: string;
|
|
59
|
+
COMPLETED: string;
|
|
60
|
+
CANCELLED: string;
|
|
61
|
+
ABANDONED: string;
|
|
62
|
+
DEFERRED: string;
|
|
63
|
+
CLOSED: string;
|
|
64
|
+
SUPERSEDED: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* WU status groups for state management (WU-1742)
|
|
68
|
+
*
|
|
69
|
+
* Used by state-bootstrap.mjs to categorize YAML statuses.
|
|
70
|
+
*/
|
|
71
|
+
export declare const WU_STATUS_GROUPS: {
|
|
72
|
+
/** Statuses representing unclaimed work (not tracked in state store) */
|
|
73
|
+
UNCLAIMED: string[];
|
|
74
|
+
/** Terminal statuses (all map to 'done' in state store) */
|
|
75
|
+
TERMINAL: string[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* WU claimed workspace modes
|
|
79
|
+
*
|
|
80
|
+
* Centralized workspace mode strings for wu:claim operations.
|
|
81
|
+
*/
|
|
82
|
+
export declare const CLAIMED_MODES: {
|
|
83
|
+
/** Standard worktree mode (isolated worktree per WU) */
|
|
84
|
+
WORKTREE: string;
|
|
85
|
+
/** Branch-only mode (no worktree, direct branch work) */
|
|
86
|
+
BRANCH_ONLY: string;
|
|
87
|
+
/** Worktree PR mode (worktree with manual PR workflow) */
|
|
88
|
+
WORKTREE_PR: string;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Agent incident severity levels
|
|
92
|
+
*
|
|
93
|
+
* Centralized severity strings for agent incident reporting.
|
|
94
|
+
*/
|
|
95
|
+
export declare const INCIDENT_SEVERITY: {
|
|
96
|
+
BLOCKER: string;
|
|
97
|
+
MAJOR: string;
|
|
98
|
+
MINOR: string;
|
|
99
|
+
INFO: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Backlog section headings (with emojis)
|
|
103
|
+
*
|
|
104
|
+
* These match the frontmatter config in backlog.md
|
|
105
|
+
*/
|
|
106
|
+
export declare const BACKLOG_SECTIONS: {
|
|
107
|
+
READY: string;
|
|
108
|
+
IN_PROGRESS: string;
|
|
109
|
+
BLOCKED: string;
|
|
110
|
+
DONE: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Backlog bullet format types (WU-1444)
|
|
114
|
+
*
|
|
115
|
+
* Used by BacklogManager to format list items in each section.
|
|
116
|
+
* Each format produces a different markdown bullet style.
|
|
117
|
+
*/
|
|
118
|
+
export declare const BACKLOG_BULLET_FORMAT: {
|
|
119
|
+
/** Ready format: '- [ ] [WU-ID — Title](link)' */
|
|
120
|
+
READY: string;
|
|
121
|
+
/** Progress format: '- [WU-ID — Title](link)' */
|
|
122
|
+
PROGRESS: string;
|
|
123
|
+
/** Blocked format: '- [ ] [WU-ID — Title](link) — Reason' */
|
|
124
|
+
BLOCKED: string;
|
|
125
|
+
/** Done format: '- [x] [WU-ID — Title](link) (YYYY-MM-DD)' */
|
|
126
|
+
DONE: string;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Status.md section headings (simpler format)
|
|
130
|
+
*/
|
|
131
|
+
export declare const STATUS_SECTIONS: {
|
|
132
|
+
IN_PROGRESS: string;
|
|
133
|
+
BLOCKED: string;
|
|
134
|
+
COMPLETED: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Regex patterns for WU operations
|
|
138
|
+
*
|
|
139
|
+
* Note: WU_ID pattern is also in wu-schema.mjs for Zod validation
|
|
140
|
+
*/
|
|
141
|
+
export declare const PATTERNS: {
|
|
142
|
+
/** WU identifier format: WU-123 */
|
|
143
|
+
WU_ID: RegExp;
|
|
144
|
+
/** Extract WU ID from text: captures "WU-123" */
|
|
145
|
+
WU_ID_EXTRACT: RegExp;
|
|
146
|
+
/** Lane branch format: lane/<lane-kebab>/wu-<id> */
|
|
147
|
+
LANE_BRANCH: RegExp;
|
|
148
|
+
/** Worktree path format: worktrees/<lane-kebab>-wu-<id> */
|
|
149
|
+
WORKTREE_PATH: RegExp;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Commit message formats
|
|
153
|
+
*
|
|
154
|
+
* These are functions that generate properly formatted commit messages
|
|
155
|
+
*/
|
|
156
|
+
export declare const COMMIT_FORMATS: {
|
|
157
|
+
/**
|
|
158
|
+
* wu:claim commit message
|
|
159
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
160
|
+
* @param {string} laneKebab - Lane in kebab-case (e.g., 'operations-tooling')
|
|
161
|
+
* @returns {string} Commit message
|
|
162
|
+
*/
|
|
163
|
+
CLAIM: (id: any, laneKebab: any) => string;
|
|
164
|
+
/**
|
|
165
|
+
* wu:done commit message
|
|
166
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
167
|
+
* @param {string} title - WU title (will be truncated if needed)
|
|
168
|
+
* @returns {string} Commit message
|
|
169
|
+
*/
|
|
170
|
+
DONE: (id: any, title: any) => string;
|
|
171
|
+
/**
|
|
172
|
+
* wu:create commit message
|
|
173
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
174
|
+
* @param {string} title - WU title (will be truncated if needed)
|
|
175
|
+
* @returns {string} Commit message
|
|
176
|
+
*/
|
|
177
|
+
CREATE: (id: any, title: any) => string;
|
|
178
|
+
/**
|
|
179
|
+
* wu:edit commit message (for ready WUs via micro-worktree)
|
|
180
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
181
|
+
* @returns {string} Commit message
|
|
182
|
+
*/
|
|
183
|
+
EDIT: (id: any) => string;
|
|
184
|
+
/**
|
|
185
|
+
* wu:edit spec update commit message (for in_progress WUs in active worktree)
|
|
186
|
+
* WU-1365: Worktree-aware editing applies edits directly in the worktree
|
|
187
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
188
|
+
* @returns {string} Commit message
|
|
189
|
+
*/
|
|
190
|
+
SPEC_UPDATE: (id: any) => string;
|
|
191
|
+
/**
|
|
192
|
+
* wu:block commit message
|
|
193
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
194
|
+
* @returns {string} Commit message
|
|
195
|
+
*/
|
|
196
|
+
BLOCK: (id: any) => string;
|
|
197
|
+
/**
|
|
198
|
+
* wu:unblock commit message
|
|
199
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
200
|
+
* @returns {string} Commit message
|
|
201
|
+
*/
|
|
202
|
+
UNBLOCK: (id: any) => string;
|
|
203
|
+
/**
|
|
204
|
+
* wu:repair commit message
|
|
205
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
206
|
+
* @returns {string} Commit message
|
|
207
|
+
*/
|
|
208
|
+
REPAIR: (id: any) => string;
|
|
209
|
+
/**
|
|
210
|
+
* Rebase artifact cleanup commit message
|
|
211
|
+
* WU-1371: Used when rebasing brings in completion artifacts from main
|
|
212
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
213
|
+
* @returns {string} Commit message
|
|
214
|
+
*/
|
|
215
|
+
REBASE_ARTIFACT_CLEANUP: (id: any) => string;
|
|
216
|
+
/**
|
|
217
|
+
* Backlog repair commit message
|
|
218
|
+
* WU-1506: Used when backlog invariant repair removes duplicates after rebase
|
|
219
|
+
* @param {string} id - WU ID (e.g., 'wu-123')
|
|
220
|
+
* @returns {string} Commit message
|
|
221
|
+
*/
|
|
222
|
+
BACKLOG_REPAIR: (id: any) => string;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Log prefixes for wu- scripts
|
|
226
|
+
*
|
|
227
|
+
* Consistent prefixes for console output
|
|
228
|
+
*/
|
|
229
|
+
export declare const LOG_PREFIX: {
|
|
230
|
+
DONE: string;
|
|
231
|
+
CLAIM: string;
|
|
232
|
+
CREATE: string;
|
|
233
|
+
EDIT: string;
|
|
234
|
+
DELETE: string;
|
|
235
|
+
BLOCK: string;
|
|
236
|
+
UNBLOCK: string;
|
|
237
|
+
UNLOCK_LANE: string;
|
|
238
|
+
CLEANUP: string;
|
|
239
|
+
PRUNE: string;
|
|
240
|
+
REPAIR: string;
|
|
241
|
+
CONSISTENCY: string;
|
|
242
|
+
PREFLIGHT: string;
|
|
243
|
+
INIT_PLAN: string;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Consistency check types (WU-1276)
|
|
247
|
+
*
|
|
248
|
+
* Layer 2 defense-in-depth: detect and repair WU state inconsistencies
|
|
249
|
+
*/
|
|
250
|
+
export declare const CONSISTENCY_TYPES: {
|
|
251
|
+
/** WU YAML has status 'done' but WU appears in status.md In Progress section */
|
|
252
|
+
YAML_DONE_STATUS_IN_PROGRESS: string;
|
|
253
|
+
/** WU appears in both Done AND In Progress sections of backlog.md */
|
|
254
|
+
BACKLOG_DUAL_SECTION: string;
|
|
255
|
+
/** WU YAML has status 'done' but no stamp file exists */
|
|
256
|
+
YAML_DONE_NO_STAMP: string;
|
|
257
|
+
/** WU has status 'done' but still has an associated worktree */
|
|
258
|
+
ORPHAN_WORKTREE_DONE: string;
|
|
259
|
+
/** Stamp file exists but WU YAML status is not 'done' (partial wu:done failure) */
|
|
260
|
+
STAMP_EXISTS_YAML_NOT_DONE: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* File system constants
|
|
264
|
+
*
|
|
265
|
+
* WU-923: Centralized to eliminate hardcoded strings
|
|
266
|
+
*/
|
|
267
|
+
export declare const FILE_SYSTEM: {
|
|
268
|
+
/** Standard file encoding */
|
|
269
|
+
ENCODING: string;
|
|
270
|
+
/** UTF-8 encoding (alias for compatibility) */
|
|
271
|
+
UTF8: string;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Process stdio constants
|
|
275
|
+
*
|
|
276
|
+
* Standard values for child_process execSync stdio option.
|
|
277
|
+
*/
|
|
278
|
+
export declare const STDIO: {
|
|
279
|
+
/** Pipe stdout/stderr (capture output) */
|
|
280
|
+
readonly PIPE: "pipe";
|
|
281
|
+
/** Inherit stdio from parent process */
|
|
282
|
+
readonly INHERIT: "inherit";
|
|
283
|
+
/** Ignore stdio (silent execution) */
|
|
284
|
+
readonly IGNORE: "ignore";
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Configuration file paths
|
|
288
|
+
*
|
|
289
|
+
* WU-923: Centralized config file names
|
|
290
|
+
*/
|
|
291
|
+
export declare const CONFIG_FILES: {
|
|
292
|
+
/** LumenFlow main config */
|
|
293
|
+
LUMENFLOW_CONFIG: string;
|
|
294
|
+
/** Lane inference taxonomy */
|
|
295
|
+
LANE_INFERENCE: string;
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Micro-worktree operation identifiers
|
|
299
|
+
*
|
|
300
|
+
* WU-923: Centralized operation names for withMicroWorktree()
|
|
301
|
+
*/
|
|
302
|
+
export declare const MICRO_WORKTREE_OPERATIONS: {
|
|
303
|
+
WU_CREATE: string;
|
|
304
|
+
WU_EDIT: string;
|
|
305
|
+
WU_DELETE: string;
|
|
306
|
+
WU_DONE: string;
|
|
307
|
+
WU_BLOCK: string;
|
|
308
|
+
WU_UNBLOCK: string;
|
|
309
|
+
WU_CLAIM: string;
|
|
310
|
+
ORPHAN_REPAIR: string;
|
|
311
|
+
INITIATIVE_EDIT: string;
|
|
312
|
+
INITIATIVE_BULK_ASSIGN: string;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Telemetry step identifiers
|
|
316
|
+
*
|
|
317
|
+
* WU-1584: Centralized telemetry step names to eliminate string literals.
|
|
318
|
+
*/
|
|
319
|
+
export declare const TELEMETRY_STEPS: {
|
|
320
|
+
GATES: string;
|
|
321
|
+
COS_GATES: string;
|
|
322
|
+
PARALLEL_DETECTION: string;
|
|
323
|
+
PARALLEL_AUTO_REBASE: string;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* WU-1747: Skip gates reason constants
|
|
327
|
+
*/
|
|
328
|
+
export declare const SKIP_GATES_REASONS: {
|
|
329
|
+
CHECKPOINT_VALID: string;
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* WU-1747: Checkpoint-related log messages
|
|
333
|
+
*/
|
|
334
|
+
export declare const CHECKPOINT_MESSAGES: {
|
|
335
|
+
SKIPPING_GATES_VALID: string;
|
|
336
|
+
CHECKPOINT_LABEL: string;
|
|
337
|
+
GATES_PASSED_AT: string;
|
|
338
|
+
COULD_NOT_CREATE: string;
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Default values
|
|
342
|
+
*/
|
|
343
|
+
export declare const DEFAULTS: {
|
|
344
|
+
/** Default worktrees directory */
|
|
345
|
+
WORKTREES_DIR: string;
|
|
346
|
+
/** Maximum commit subject length (commitlint default) */
|
|
347
|
+
MAX_COMMIT_SUBJECT: number;
|
|
348
|
+
/** Parent directory traversal depth from tools/lib to project root */
|
|
349
|
+
PROJECT_ROOT_DEPTH: number;
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* YAML serialization options
|
|
353
|
+
*
|
|
354
|
+
* Centralized from duplicated { lineWidth: 100 } across wu-* scripts (WU-1256).
|
|
355
|
+
* Use with js-yaml dump() function.
|
|
356
|
+
*/
|
|
357
|
+
export declare const YAML_OPTIONS: {
|
|
358
|
+
/** Standard line width for YAML dump (100 chars) */
|
|
359
|
+
LINE_WIDTH: number;
|
|
360
|
+
/** No line wrapping (-1 disables wrapping in js-yaml) */
|
|
361
|
+
NO_WRAP: number;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* UI display constants
|
|
365
|
+
*
|
|
366
|
+
* WU-1281: Centralized from hardcoded values in wu-done.mjs
|
|
367
|
+
*/
|
|
368
|
+
export declare const UI: {
|
|
369
|
+
/** Width for error/info boxes in console output */
|
|
370
|
+
ERROR_BOX_WIDTH: number;
|
|
371
|
+
/** Number of lines to show in status file preview */
|
|
372
|
+
STATUS_PREVIEW_LINES: number;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* Box drawing characters for console output
|
|
376
|
+
*
|
|
377
|
+
* Emergency fix (Session 2): Centralized to eliminate sonarjs/no-duplicate-string errors
|
|
378
|
+
* Used for recovery dialogs and error boxes in wu-* scripts
|
|
379
|
+
*/
|
|
380
|
+
export declare const BOX: {
|
|
381
|
+
/** Top border: ╔══...══╗ (66 chars inside + corners = 68 total) */
|
|
382
|
+
TOP: string;
|
|
383
|
+
/** Middle separator: ╠══...══╣ */
|
|
384
|
+
MID: string;
|
|
385
|
+
/** Bottom border: ╚══...══╝ */
|
|
386
|
+
BOT: string;
|
|
387
|
+
/** Side border for content lines */
|
|
388
|
+
SIDE: string;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Git display constants
|
|
392
|
+
*
|
|
393
|
+
* Emergency fix (Session 2): Centralized from hardcoded magic numbers
|
|
394
|
+
* Used for display truncation of SHAs and session IDs
|
|
395
|
+
*/
|
|
396
|
+
export declare const GIT: {
|
|
397
|
+
/** Standard length for displaying short SHA hashes (e.g., "abc12345") */
|
|
398
|
+
SHA_SHORT_LENGTH: number;
|
|
399
|
+
/** Max number of commits to inspect in git log lookbacks */
|
|
400
|
+
LOG_MAX_COUNT: number;
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* Real git executable path - MUST bypass tools/shims to prevent recursion.
|
|
404
|
+
*
|
|
405
|
+
* CRITICAL: The git shim (tools/shims/git) calls functions that need to run git
|
|
406
|
+
* commands. If those functions use 'git' (which resolves to the shim), we get
|
|
407
|
+
* infinite recursion: shim → helper → git → shim → helper → git → ...
|
|
408
|
+
*
|
|
409
|
+
* With VS Code extensions making dozens of git calls per second, this causes
|
|
410
|
+
* memory exhaustion within seconds → OOM crash → system reboot.
|
|
411
|
+
*
|
|
412
|
+
* P0 incident: 2025-12-10 server crash due to recursive fork bomb.
|
|
413
|
+
*
|
|
414
|
+
* @see tools/shims/git - The git shim that blocks destructive commands
|
|
415
|
+
* @see tools/lib/wu-helpers.mjs - Uses REAL_GIT to avoid recursion
|
|
416
|
+
*/
|
|
417
|
+
export declare const REAL_GIT = "/usr/bin/git";
|
|
418
|
+
/**
|
|
419
|
+
* Git command flags
|
|
420
|
+
*
|
|
421
|
+
* Centralized git flag constants to eliminate hardcoded strings.
|
|
422
|
+
* Used by git-adapter.mjs and other git operation utilities.
|
|
423
|
+
*/
|
|
424
|
+
export declare const GIT_FLAGS: {
|
|
425
|
+
/** Show abbreviated ref names (for branch name resolution) */
|
|
426
|
+
ABBREV_REF: string;
|
|
427
|
+
/** Porcelain format (machine-readable output) */
|
|
428
|
+
PORCELAIN: string;
|
|
429
|
+
/** Create new branch and switch to it */
|
|
430
|
+
BRANCH: string;
|
|
431
|
+
/** Force flag (long form) */
|
|
432
|
+
FORCE: string;
|
|
433
|
+
/** Force flag (short form) */
|
|
434
|
+
FORCE_SHORT: string;
|
|
435
|
+
/** Fast-forward only merge */
|
|
436
|
+
FF_ONLY: string;
|
|
437
|
+
/** Check ancestry without output (merge-base) */
|
|
438
|
+
IS_ANCESTOR: string;
|
|
439
|
+
/** Set upstream tracking */
|
|
440
|
+
UPSTREAM: string;
|
|
441
|
+
/** Delete branch (safe - only if merged) */
|
|
442
|
+
DELETE: string;
|
|
443
|
+
/** Delete branch (force - even if not merged) */
|
|
444
|
+
DELETE_FORCE: string;
|
|
445
|
+
/** Hard reset flag */
|
|
446
|
+
HARD: string;
|
|
447
|
+
/** Soft reset flag */
|
|
448
|
+
SOFT: string;
|
|
449
|
+
/** fd flags for clean (force delete directories) */
|
|
450
|
+
FD_SHORT: string;
|
|
451
|
+
/** df flags for clean (delete force directories) */
|
|
452
|
+
DF_SHORT: string;
|
|
453
|
+
/** No verify flag (skip pre-commit/commit-msg hooks) */
|
|
454
|
+
NO_VERIFY: string;
|
|
455
|
+
/** No GPG sign flag (skip commit signing) */
|
|
456
|
+
NO_GPG_SIGN: string;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Git commands
|
|
460
|
+
*
|
|
461
|
+
* Centralized git command strings to eliminate hardcoded strings.
|
|
462
|
+
* Used for direct git command execution via execSync/execa.
|
|
463
|
+
*/
|
|
464
|
+
export declare const GIT_COMMANDS: {
|
|
465
|
+
/** Git binary */
|
|
466
|
+
GIT: string;
|
|
467
|
+
/** Git reset command */
|
|
468
|
+
RESET: string;
|
|
469
|
+
/** List tree objects (check file existence on branch) */
|
|
470
|
+
LS_TREE: string;
|
|
471
|
+
/** Git diff command */
|
|
472
|
+
DIFF: string;
|
|
473
|
+
/** Git merge-base command */
|
|
474
|
+
MERGE_BASE: string;
|
|
475
|
+
/** Git rev-parse command */
|
|
476
|
+
REV_PARSE: string;
|
|
477
|
+
/** Git diff flags */
|
|
478
|
+
CACHED: string;
|
|
479
|
+
NAME_ONLY: string;
|
|
480
|
+
DIFF_FILTER_ACM: string;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Session display constants
|
|
484
|
+
*
|
|
485
|
+
* Emergency fix (Session 2): Centralized from hardcoded magic numbers
|
|
486
|
+
*/
|
|
487
|
+
export declare const SESSION: {
|
|
488
|
+
/** Standard length for displaying session ID prefix (e.g., "sess-123") */
|
|
489
|
+
ID_DISPLAY_LENGTH: number;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* Validation constants
|
|
493
|
+
*
|
|
494
|
+
* WU-1281: Centralized from local constants in validators
|
|
495
|
+
*/
|
|
496
|
+
export declare const VALIDATION: {
|
|
497
|
+
/** Minimum description length for WU spec completeness */
|
|
498
|
+
MIN_DESCRIPTION_LENGTH: number;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Threshold constants for pre-flight checks
|
|
502
|
+
*
|
|
503
|
+
* WU-1302: Centralized to eliminate magic numbers
|
|
504
|
+
* WU-1370: Added graduated drift thresholds for early warnings
|
|
505
|
+
*/
|
|
506
|
+
export declare const THRESHOLDS: {
|
|
507
|
+
/** Info threshold: commits behind main to suggest rebasing (WU-1370) */
|
|
508
|
+
BRANCH_DRIFT_INFO: number;
|
|
509
|
+
/** Warning threshold: commits behind main where rebase is recommended (WU-1370) */
|
|
510
|
+
BRANCH_DRIFT_WARNING: number;
|
|
511
|
+
/** Maximum commits behind main before requiring rebase (WU-755 pre-flight) */
|
|
512
|
+
BRANCH_DRIFT_MAX: number;
|
|
513
|
+
};
|
|
514
|
+
/**
|
|
515
|
+
* WU type values
|
|
516
|
+
*
|
|
517
|
+
* WU-1281: Centralized from hardcoded strings in validators
|
|
518
|
+
*/
|
|
519
|
+
export declare const WU_TYPES: {
|
|
520
|
+
DOCUMENTATION: string;
|
|
521
|
+
PROCESS: string;
|
|
522
|
+
FEATURE: string;
|
|
523
|
+
TOOLING: string;
|
|
524
|
+
BUG: string;
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* WU exposure values (WU-1998)
|
|
528
|
+
*
|
|
529
|
+
* Defines how a WU exposes its functionality to users.
|
|
530
|
+
* Used to ensure backend features have corresponding UI coverage.
|
|
531
|
+
*
|
|
532
|
+
* @see {@link tools/lib/wu-schema.mjs} - Schema validation
|
|
533
|
+
* @see {@link packages/linters/wu-schema-linter.mjs} - Linter validation
|
|
534
|
+
*/
|
|
535
|
+
export declare const WU_EXPOSURE: {
|
|
536
|
+
/** User-facing UI changes (pages, components, widgets) */
|
|
537
|
+
readonly UI: "ui";
|
|
538
|
+
/** API endpoints that are called by UI or external clients */
|
|
539
|
+
readonly API: "api";
|
|
540
|
+
/** Backend-only changes (no user visibility) */
|
|
541
|
+
readonly BACKEND_ONLY: "backend-only";
|
|
542
|
+
/** Documentation changes only */
|
|
543
|
+
readonly DOCUMENTATION: "documentation";
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Array of valid exposure values for schema validation
|
|
547
|
+
* Note: Defined as tuple for Zod enum compatibility
|
|
548
|
+
*/
|
|
549
|
+
export declare const WU_EXPOSURE_VALUES: readonly ["ui", "api", "backend-only", "documentation"];
|
|
550
|
+
/**
|
|
551
|
+
* Test type keys
|
|
552
|
+
*
|
|
553
|
+
* WU-1281: Centralized from hardcoded keys in validators
|
|
554
|
+
*/
|
|
555
|
+
export declare const TEST_TYPES: {
|
|
556
|
+
UNIT: string;
|
|
557
|
+
E2E: string;
|
|
558
|
+
MANUAL: string;
|
|
559
|
+
INTEGRATION: string;
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* Safety-critical test glob patterns
|
|
563
|
+
*
|
|
564
|
+
* WU-2242: Centralized list of glob patterns for safety tests that MUST exist.
|
|
565
|
+
* Gates fail if any of these patterns find no matches.
|
|
566
|
+
*
|
|
567
|
+
* These patterns identify tests for:
|
|
568
|
+
* - PHI (Protected Health Information) protection
|
|
569
|
+
* - Escalation triggers
|
|
570
|
+
* - Privacy detection
|
|
571
|
+
* - Constitutional enforcement
|
|
572
|
+
* - Safe prompt wrapping
|
|
573
|
+
* - Crisis/emergency handling
|
|
574
|
+
*
|
|
575
|
+
* @type {string[]}
|
|
576
|
+
*/
|
|
577
|
+
export declare const SAFETY_CRITICAL_TEST_GLOBS: readonly string[];
|
|
578
|
+
/**
|
|
579
|
+
* Emoji constants for consistent console output
|
|
580
|
+
*
|
|
581
|
+
* WU-1281: Centralized from hardcoded emojis across wu-* scripts
|
|
582
|
+
*/
|
|
583
|
+
export declare const EMOJI: {
|
|
584
|
+
SUCCESS: string;
|
|
585
|
+
FAILURE: string;
|
|
586
|
+
WARNING: string;
|
|
587
|
+
INFO: string;
|
|
588
|
+
BLOCKED: string;
|
|
589
|
+
ROCKET: string;
|
|
590
|
+
WRENCH: string;
|
|
591
|
+
TARGET: string;
|
|
592
|
+
MEMO: string;
|
|
593
|
+
FOLDER: string;
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* Default values for WU YAML fields
|
|
597
|
+
*
|
|
598
|
+
* WU-1337: Centralized defaults for auto-repair in schema validation
|
|
599
|
+
* DRY principle: Single source of truth for optional field defaults
|
|
600
|
+
*
|
|
601
|
+
* Used by wu-schema.mjs Zod transformations to provide sensible defaults
|
|
602
|
+
* when agents omit optional fields, reducing validation errors.
|
|
603
|
+
*/
|
|
604
|
+
export declare const WU_DEFAULTS: {
|
|
605
|
+
/** Default priority level (medium priority) */
|
|
606
|
+
priority: string;
|
|
607
|
+
/** Default status for new WUs */
|
|
608
|
+
status: string;
|
|
609
|
+
/** Default work type */
|
|
610
|
+
type: string;
|
|
611
|
+
/** Default code paths (empty until populated) */
|
|
612
|
+
code_paths: any[];
|
|
613
|
+
/** Default test structure (includes all test types) */
|
|
614
|
+
tests: {
|
|
615
|
+
manual: any[];
|
|
616
|
+
unit: any[];
|
|
617
|
+
integration: any[];
|
|
618
|
+
e2e: any[];
|
|
619
|
+
};
|
|
620
|
+
/** Default artifacts (empty - wu:done adds stamp) */
|
|
621
|
+
artifacts: any[];
|
|
622
|
+
/** Default dependencies (no blockers) */
|
|
623
|
+
dependencies: any[];
|
|
624
|
+
/** Default risks (none identified) */
|
|
625
|
+
risks: any[];
|
|
626
|
+
/** Default notes (empty string, not undefined) */
|
|
627
|
+
notes: string;
|
|
628
|
+
/** Default review requirement (agent-completed WUs) */
|
|
629
|
+
requires_review: boolean;
|
|
630
|
+
};
|
|
631
|
+
/**
|
|
632
|
+
* Lane-to-code_paths validation patterns (WU-1372)
|
|
633
|
+
*
|
|
634
|
+
* Advisory patterns to warn when a WU's lane doesn't match its code_paths.
|
|
635
|
+
* Each lane parent can define paths to exclude (paths that shouldn't appear
|
|
636
|
+
* for that lane) and paths that are exceptionally allowed.
|
|
637
|
+
*
|
|
638
|
+
* Validation is advisory only - never blocks wu:claim or wu:done.
|
|
639
|
+
*
|
|
640
|
+
* @see {@link tools/lib/lane-validator.mjs} - Validation logic
|
|
641
|
+
*/
|
|
642
|
+
export declare const LANE_PATH_PATTERNS: {
|
|
643
|
+
/**
|
|
644
|
+
* Operations lane should not touch prompt-related paths.
|
|
645
|
+
* These paths belong to the Intelligence lane.
|
|
646
|
+
*/
|
|
647
|
+
Operations: {
|
|
648
|
+
exclude: string[];
|
|
649
|
+
allowExceptions: any[];
|
|
650
|
+
};
|
|
651
|
+
/**
|
|
652
|
+
* Intelligence lane should not touch tooling paths.
|
|
653
|
+
* Exception: tools/lib/prompt-* files are Intelligence-owned.
|
|
654
|
+
*/
|
|
655
|
+
Intelligence: {
|
|
656
|
+
exclude: string[];
|
|
657
|
+
allowExceptions: string[];
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
/**
|
|
661
|
+
* Process detection constants for background process warning (WU-1381)
|
|
662
|
+
*
|
|
663
|
+
* Used by process-detector.mjs to identify processes that may interfere
|
|
664
|
+
* with wu:done gates execution.
|
|
665
|
+
*/
|
|
666
|
+
export declare const PROCESS_DETECTION: {
|
|
667
|
+
/**
|
|
668
|
+
* Process names that commonly interfere with gates execution.
|
|
669
|
+
* These processes may:
|
|
670
|
+
* - Write to stdout/stderr (causing mixed output)
|
|
671
|
+
* - Hold file locks that may cause test failures
|
|
672
|
+
* - Consume resources that affect gate performance
|
|
673
|
+
*/
|
|
674
|
+
INTERFERING_NAMES: string[];
|
|
675
|
+
/** Maximum characters to display for command in warnings */
|
|
676
|
+
CMD_DISPLAY_LIMIT: number;
|
|
677
|
+
};
|
|
678
|
+
/**
|
|
679
|
+
* CLI argument flags
|
|
680
|
+
*
|
|
681
|
+
* Centralized command-line argument strings to eliminate hardcoded flags.
|
|
682
|
+
* Used across wu-* scripts, gates, and validation tools.
|
|
683
|
+
*/
|
|
684
|
+
export declare const CLI_FLAGS: {
|
|
685
|
+
DRY_RUN: string;
|
|
686
|
+
EXECUTE: string;
|
|
687
|
+
HELP: string;
|
|
688
|
+
HELP_SHORT: string;
|
|
689
|
+
VERBOSE: string;
|
|
690
|
+
FIX: string;
|
|
691
|
+
JSON: string;
|
|
692
|
+
FORCE: string;
|
|
693
|
+
DOCS_ONLY: string;
|
|
694
|
+
FULL_LINT: string;
|
|
695
|
+
FULL_TESTS: string;
|
|
696
|
+
FULL_COVERAGE: string;
|
|
697
|
+
COVERAGE_MODE: string;
|
|
698
|
+
WU: string;
|
|
699
|
+
ID: string;
|
|
700
|
+
ALL: string;
|
|
701
|
+
CHECK: string;
|
|
702
|
+
TIER: string;
|
|
703
|
+
AGENT_TYPE: string;
|
|
704
|
+
DESCRIPTION: string;
|
|
705
|
+
ACCEPTANCE: string;
|
|
706
|
+
VALIDATE: string;
|
|
707
|
+
REASON: string;
|
|
708
|
+
WEEK: string;
|
|
709
|
+
SINCE: string;
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* pnpm/npm command flags
|
|
713
|
+
*
|
|
714
|
+
* Centralized package manager flag strings.
|
|
715
|
+
*/
|
|
716
|
+
export declare const PKG_FLAGS: {
|
|
717
|
+
FILTER: string;
|
|
718
|
+
FROZEN_LOCKFILE: string;
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* ESLint command flags
|
|
722
|
+
*
|
|
723
|
+
* Centralized ESLint CLI flag strings.
|
|
724
|
+
*/
|
|
725
|
+
export declare const ESLINT_FLAGS: {
|
|
726
|
+
MAX_WARNINGS: string;
|
|
727
|
+
NO_WARN_IGNORED: string;
|
|
728
|
+
CACHE: string;
|
|
729
|
+
CACHE_STRATEGY: string;
|
|
730
|
+
CACHE_LOCATION: string;
|
|
731
|
+
PASS_ON_UNPRUNED: string;
|
|
732
|
+
};
|
|
733
|
+
/**
|
|
734
|
+
* pnpm script names
|
|
735
|
+
*
|
|
736
|
+
* Centralized script names for package.json commands.
|
|
737
|
+
*/
|
|
738
|
+
export declare const SCRIPTS: {
|
|
739
|
+
LINT: string;
|
|
740
|
+
TEST: string;
|
|
741
|
+
TEST_UNIT: string;
|
|
742
|
+
BUILD: string;
|
|
743
|
+
FORMAT: string;
|
|
744
|
+
FORMAT_CHECK: string;
|
|
745
|
+
TYPECHECK: string;
|
|
746
|
+
DEV: string;
|
|
747
|
+
SPEC_LINTER: string;
|
|
748
|
+
PROMPTS_LINT: string;
|
|
749
|
+
RUN: string;
|
|
750
|
+
GATES: string;
|
|
751
|
+
COS_GATES: string;
|
|
752
|
+
PRETTIER: string;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* Gate names for quality gates
|
|
756
|
+
*
|
|
757
|
+
* Centralized gate identifiers for gates.mjs and telemetry.
|
|
758
|
+
*/
|
|
759
|
+
export declare const GATE_NAMES: {
|
|
760
|
+
/** WU-2252: Invariants check (runs first, non-bypassable) */
|
|
761
|
+
INVARIANTS: string;
|
|
762
|
+
FORMAT_CHECK: string;
|
|
763
|
+
SPEC_LINTER: string;
|
|
764
|
+
PROMPTS_LINT: string;
|
|
765
|
+
BACKLOG_SYNC: string;
|
|
766
|
+
SUPABASE_DOCS_LINTER: string;
|
|
767
|
+
LINT: string;
|
|
768
|
+
TYPECHECK: string;
|
|
769
|
+
TEST: string;
|
|
770
|
+
COVERAGE: string;
|
|
771
|
+
/** WU-2062: Safety-critical tests (always run) */
|
|
772
|
+
SAFETY_CRITICAL_TEST: string;
|
|
773
|
+
/** WU-2062: Integration tests (for high-risk changes) */
|
|
774
|
+
INTEGRATION_TEST: string;
|
|
775
|
+
/** WU-2315: System map validation (warn-only until orphan docs are indexed) */
|
|
776
|
+
SYSTEM_MAP_VALIDATE: string;
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* Gate command sentinels (special values for non-shell commands)
|
|
780
|
+
*
|
|
781
|
+
* These are not shell commands but trigger special handling in gates.mjs.
|
|
782
|
+
*/
|
|
783
|
+
export declare const GATE_COMMANDS: {
|
|
784
|
+
/** WU-2252: Triggers invariants check */
|
|
785
|
+
INVARIANTS: string;
|
|
786
|
+
/** Triggers incremental lint (only changed files) */
|
|
787
|
+
INCREMENTAL: string;
|
|
788
|
+
/** Triggers incremental tests (only tests related to changed files) - WU-1920 */
|
|
789
|
+
INCREMENTAL_TEST: string;
|
|
790
|
+
/** Triggers coverage gate check */
|
|
791
|
+
COVERAGE_GATE: string;
|
|
792
|
+
/** WU-2062: Triggers safety-critical tests (always run) */
|
|
793
|
+
SAFETY_CRITICAL_TEST: string;
|
|
794
|
+
/** WU-2062: Triggers tiered test execution based on risk */
|
|
795
|
+
TIERED_TEST: string;
|
|
796
|
+
};
|
|
797
|
+
/**
|
|
798
|
+
* Tool paths for scripts
|
|
799
|
+
*
|
|
800
|
+
* Centralized paths to tool scripts.
|
|
801
|
+
*/
|
|
802
|
+
export declare const TOOL_PATHS: {
|
|
803
|
+
VALIDATE_BACKLOG_SYNC: string;
|
|
804
|
+
SUPABASE_DOCS_LINTER: string;
|
|
805
|
+
/** WU-2315: System map validator script */
|
|
806
|
+
SYSTEM_MAP_VALIDATE: string;
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* CLI mode flags
|
|
810
|
+
*
|
|
811
|
+
* Command-line mode arguments.
|
|
812
|
+
*/
|
|
813
|
+
export declare const CLI_MODES: {
|
|
814
|
+
LOCAL: string;
|
|
815
|
+
};
|
|
816
|
+
/**
|
|
817
|
+
* Prettier command flags
|
|
818
|
+
*
|
|
819
|
+
* Centralized prettier CLI flag strings.
|
|
820
|
+
*/
|
|
821
|
+
export declare const PRETTIER_FLAGS: {
|
|
822
|
+
WRITE: string;
|
|
823
|
+
};
|
|
824
|
+
/**
|
|
825
|
+
* Package manager commands
|
|
826
|
+
*
|
|
827
|
+
* Centralized pnpm command strings.
|
|
828
|
+
*/
|
|
829
|
+
export declare const PKG_MANAGER = "pnpm";
|
|
830
|
+
/**
|
|
831
|
+
* Package manager subcommands
|
|
832
|
+
*
|
|
833
|
+
* Centralized pnpm subcommand strings.
|
|
834
|
+
*/
|
|
835
|
+
export declare const PKG_COMMANDS: {
|
|
836
|
+
INSTALL: string;
|
|
837
|
+
};
|
|
838
|
+
/**
|
|
839
|
+
* Package names (monorepo workspaces)
|
|
840
|
+
*
|
|
841
|
+
* Centralized package names for --filter usage.
|
|
842
|
+
*/
|
|
843
|
+
export declare const PACKAGES: {
|
|
844
|
+
WEB: string;
|
|
845
|
+
APPLICATION: string;
|
|
846
|
+
DOMAIN: string;
|
|
847
|
+
INFRASTRUCTURE: string;
|
|
848
|
+
};
|
|
849
|
+
/**
|
|
850
|
+
* Directory paths within the monorepo
|
|
851
|
+
*
|
|
852
|
+
* Centralized directory path strings.
|
|
853
|
+
*/
|
|
854
|
+
export declare const DIRECTORIES: {
|
|
855
|
+
APPS_WEB: string;
|
|
856
|
+
WORKTREES: string;
|
|
857
|
+
AI: string;
|
|
858
|
+
CLAUDE: string;
|
|
859
|
+
DOCS: string;
|
|
860
|
+
PACKAGES: string;
|
|
861
|
+
TOOLS: string;
|
|
862
|
+
MEMORY_BANK: string;
|
|
863
|
+
WU_DIR: string;
|
|
864
|
+
INITIATIVES_DIR: string;
|
|
865
|
+
BACKLOG_PATH: string;
|
|
866
|
+
STATUS_PATH: string;
|
|
867
|
+
};
|
|
868
|
+
/**
|
|
869
|
+
* ESLint cache strategy values
|
|
870
|
+
*/
|
|
871
|
+
export declare const CACHE_STRATEGIES: {
|
|
872
|
+
CONTENT: string;
|
|
873
|
+
METADATA: string;
|
|
874
|
+
};
|
|
875
|
+
/**
|
|
876
|
+
* Process stdio modes
|
|
877
|
+
*
|
|
878
|
+
* Centralized stdio configuration values for child_process operations.
|
|
879
|
+
*/
|
|
880
|
+
export declare const STDIO_MODES: {
|
|
881
|
+
/** Inherit stdio from parent process (shows output in console) */
|
|
882
|
+
readonly INHERIT: "inherit";
|
|
883
|
+
/** Pipe stdio to parent process (capture output) */
|
|
884
|
+
readonly PIPE: "pipe";
|
|
885
|
+
/** Ignore stdio (discard output) */
|
|
886
|
+
readonly IGNORE: "ignore";
|
|
887
|
+
};
|
|
888
|
+
/**
|
|
889
|
+
* Process exit codes
|
|
890
|
+
*
|
|
891
|
+
* Standard exit code values for CLI scripts.
|
|
892
|
+
*/
|
|
893
|
+
export declare const EXIT_CODES: {
|
|
894
|
+
/** Success exit code */
|
|
895
|
+
SUCCESS: number;
|
|
896
|
+
/** Generic error exit code */
|
|
897
|
+
ERROR: number;
|
|
898
|
+
/** Fatal or distinct failure exit code */
|
|
899
|
+
FAILURE: number;
|
|
900
|
+
};
|
|
901
|
+
/**
|
|
902
|
+
* ESLint command names
|
|
903
|
+
*
|
|
904
|
+
* Centralized ESLint command strings.
|
|
905
|
+
*/
|
|
906
|
+
export declare const ESLINT_COMMANDS: {
|
|
907
|
+
/** ESLint CLI command */
|
|
908
|
+
ESLINT: string;
|
|
909
|
+
};
|
|
910
|
+
/**
|
|
911
|
+
* ESLint default values
|
|
912
|
+
*
|
|
913
|
+
* Default configuration values for ESLint operations.
|
|
914
|
+
*/
|
|
915
|
+
export declare const ESLINT_DEFAULTS: {
|
|
916
|
+
/**
|
|
917
|
+
* Maximum allowed warnings
|
|
918
|
+
*
|
|
919
|
+
* WU-1866: Temporarily increased from 0 to 100 to unblock gates.
|
|
920
|
+
* There are ~82 pre-existing warnings that need proper fixes.
|
|
921
|
+
* TODO: Create follow-up WU to fix warnings and restore zero-warnings policy.
|
|
922
|
+
*/
|
|
923
|
+
MAX_WARNINGS: string;
|
|
924
|
+
};
|
|
925
|
+
/**
|
|
926
|
+
* Git command combinations
|
|
927
|
+
*
|
|
928
|
+
* Full git command strings for common operations.
|
|
929
|
+
*/
|
|
930
|
+
export declare const GIT_COMMAND_STRINGS: {
|
|
931
|
+
/** Get diff of cached (staged) files */
|
|
932
|
+
DIFF_CACHED: string;
|
|
933
|
+
/** Get names of cached files */
|
|
934
|
+
DIFF_CACHED_NAMES: string;
|
|
935
|
+
/** Get names of cached files (added, copied, modified) */
|
|
936
|
+
DIFF_CACHED_ACM: string;
|
|
937
|
+
/** Get cached diff with zero context (used for hook validation) */
|
|
938
|
+
DIFF_CACHED_UNIFIED_ZERO: string;
|
|
939
|
+
/** Get current branch name */
|
|
940
|
+
REV_PARSE_ABBREV_REF_HEAD: string;
|
|
941
|
+
};
|
|
942
|
+
/**
|
|
943
|
+
* Path patterns for WU-related files
|
|
944
|
+
*/
|
|
945
|
+
export declare const PATH_PATTERNS: {
|
|
946
|
+
/** Matches WU YAML paths in both legacy and current locations */
|
|
947
|
+
WU_YAML: RegExp;
|
|
948
|
+
/** Matches stamp file paths */
|
|
949
|
+
STAMP: RegExp;
|
|
950
|
+
};
|
|
951
|
+
/**
|
|
952
|
+
* Common shell commands
|
|
953
|
+
*
|
|
954
|
+
* Centralized command names for child_process operations.
|
|
955
|
+
*/
|
|
956
|
+
export declare const SHELL_COMMANDS: {
|
|
957
|
+
/** Which command (check if executable exists) */
|
|
958
|
+
WHICH: string;
|
|
959
|
+
/** Cat command (concatenate files) */
|
|
960
|
+
CAT: string;
|
|
961
|
+
/** Node.js executable */
|
|
962
|
+
NODE: string;
|
|
963
|
+
};
|
|
964
|
+
/**
|
|
965
|
+
* External tool commands
|
|
966
|
+
*
|
|
967
|
+
* Centralized tool command names.
|
|
968
|
+
*/
|
|
969
|
+
export declare const TOOLS: {
|
|
970
|
+
/** Gitleaks secret scanner */
|
|
971
|
+
GITLEAKS: string;
|
|
972
|
+
/** ESLint linter */
|
|
973
|
+
ESLINT: string;
|
|
974
|
+
/** Prettier formatter */
|
|
975
|
+
PRETTIER: string;
|
|
976
|
+
/** TypeScript compiler */
|
|
977
|
+
TSC: string;
|
|
978
|
+
};
|
|
979
|
+
/**
|
|
980
|
+
* Gitleaks command arguments
|
|
981
|
+
*
|
|
982
|
+
* Centralized gitleaks CLI arguments.
|
|
983
|
+
*/
|
|
984
|
+
export declare const GITLEAKS_ARGS: {
|
|
985
|
+
/** Protect mode (scan staged files) */
|
|
986
|
+
PROTECT: string;
|
|
987
|
+
/** Staged flag */
|
|
988
|
+
STAGED: string;
|
|
989
|
+
/** Verbose output */
|
|
990
|
+
VERBOSE: string;
|
|
991
|
+
};
|
|
992
|
+
/**
|
|
993
|
+
* Prettier command arguments
|
|
994
|
+
*
|
|
995
|
+
* Centralized prettier CLI arguments.
|
|
996
|
+
*/
|
|
997
|
+
export declare const PRETTIER_ARGS: {
|
|
998
|
+
/** Check formatting without writing */
|
|
999
|
+
CHECK: string;
|
|
1000
|
+
};
|
|
1001
|
+
/**
|
|
1002
|
+
* Audit command arguments
|
|
1003
|
+
*
|
|
1004
|
+
* Centralized pnpm audit CLI arguments.
|
|
1005
|
+
*/
|
|
1006
|
+
export declare const AUDIT_ARGS: {
|
|
1007
|
+
/** Audit subcommand */
|
|
1008
|
+
AUDIT: string;
|
|
1009
|
+
/** Audit level flag */
|
|
1010
|
+
AUDIT_LEVEL_MODERATE: string;
|
|
1011
|
+
/** Ignore registry errors */
|
|
1012
|
+
IGNORE_REGISTRY_ERRORS: string;
|
|
1013
|
+
/** Auto-fix flag */
|
|
1014
|
+
FIX: string;
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* Script file paths
|
|
1018
|
+
*
|
|
1019
|
+
* Centralized paths to validation scripts.
|
|
1020
|
+
*/
|
|
1021
|
+
export declare const SCRIPT_PATHS: {
|
|
1022
|
+
/** WU YAML validation */
|
|
1023
|
+
VALIDATE: string;
|
|
1024
|
+
/** Prompt registry validation */
|
|
1025
|
+
VALIDATE_PROMPT_REGISTRY: string;
|
|
1026
|
+
};
|
|
1027
|
+
/**
|
|
1028
|
+
* Known package names for vulnerability tracking
|
|
1029
|
+
*
|
|
1030
|
+
* Package identifiers used in dependency auditing.
|
|
1031
|
+
*/
|
|
1032
|
+
export declare const KNOWN_PACKAGES: {
|
|
1033
|
+
/** node-forge crypto library */
|
|
1034
|
+
NODE_FORGE: string;
|
|
1035
|
+
/** Next.js framework */
|
|
1036
|
+
NEXT: string;
|
|
1037
|
+
/** jsPDF PDF generation library */
|
|
1038
|
+
JSPDF: string;
|
|
1039
|
+
};
|
|
1040
|
+
/**
|
|
1041
|
+
* Error codes and messages
|
|
1042
|
+
*
|
|
1043
|
+
* Centralized error identifiers for consistency.
|
|
1044
|
+
*/
|
|
1045
|
+
export declare const ERROR_CODES: {
|
|
1046
|
+
/** Socket timeout error */
|
|
1047
|
+
ERR_SOCKET_TIMEOUT: string;
|
|
1048
|
+
/** Timeout error code */
|
|
1049
|
+
ETIMEDOUT: string;
|
|
1050
|
+
};
|
|
1051
|
+
/**
|
|
1052
|
+
* Beacon directory paths
|
|
1053
|
+
*
|
|
1054
|
+
* Centralized paths for .beacon directory structure to eliminate hardcoded strings.
|
|
1055
|
+
* Used by telemetry, agent-session, agent-incidents, and commands-logger modules.
|
|
1056
|
+
*/
|
|
1057
|
+
export declare const BEACON_PATHS: {
|
|
1058
|
+
/** WU state store directory */
|
|
1059
|
+
STATE_DIR: string;
|
|
1060
|
+
/** Stamp directory (WU completion markers) */
|
|
1061
|
+
STAMPS_DIR: string;
|
|
1062
|
+
/** Merge lock file (runtime coordination, WU-1747) */
|
|
1063
|
+
MERGE_LOCK: string;
|
|
1064
|
+
/** Base telemetry directory */
|
|
1065
|
+
TELEMETRY: string;
|
|
1066
|
+
/** Flow log file (WU flow events) */
|
|
1067
|
+
FLOW_LOG: string;
|
|
1068
|
+
/** Agent sessions directory */
|
|
1069
|
+
SESSIONS: string;
|
|
1070
|
+
/** Agent incidents directory */
|
|
1071
|
+
INCIDENTS: string;
|
|
1072
|
+
/** Git commands log file */
|
|
1073
|
+
COMMANDS_LOG: string;
|
|
1074
|
+
};
|
|
1075
|
+
/**
|
|
1076
|
+
* File extensions
|
|
1077
|
+
*
|
|
1078
|
+
* Centralized file extension strings to avoid magic strings.
|
|
1079
|
+
*/
|
|
1080
|
+
export declare const FILE_EXTENSIONS: {
|
|
1081
|
+
/** Newline-delimited JSON format */
|
|
1082
|
+
NDJSON: string;
|
|
1083
|
+
/** Markdown format */
|
|
1084
|
+
MARKDOWN: string;
|
|
1085
|
+
/** YAML format */
|
|
1086
|
+
YAML: string;
|
|
1087
|
+
/** Log format */
|
|
1088
|
+
LOG: string;
|
|
1089
|
+
/** Stamp files (completion markers) */
|
|
1090
|
+
STAMP: string;
|
|
1091
|
+
};
|
|
1092
|
+
/**
|
|
1093
|
+
* String formatting constants
|
|
1094
|
+
*
|
|
1095
|
+
* Centralized string literals for consistent formatting across scripts.
|
|
1096
|
+
* Eliminates hardcoded '\n', ' ', etc. throughout the codebase.
|
|
1097
|
+
*/
|
|
1098
|
+
export declare const STRING_LITERALS: {
|
|
1099
|
+
/** Newline character */
|
|
1100
|
+
NEWLINE: string;
|
|
1101
|
+
/** Double newline (paragraph separator) */
|
|
1102
|
+
DOUBLE_NEWLINE: string;
|
|
1103
|
+
/** Space character */
|
|
1104
|
+
SPACE: string;
|
|
1105
|
+
/** Empty string */
|
|
1106
|
+
EMPTY: string;
|
|
1107
|
+
/** Tab character */
|
|
1108
|
+
TAB: string;
|
|
1109
|
+
/** Comma separator */
|
|
1110
|
+
COMMA: string;
|
|
1111
|
+
/** Colon separator */
|
|
1112
|
+
COLON: string;
|
|
1113
|
+
/** Dash/hyphen */
|
|
1114
|
+
DASH: string;
|
|
1115
|
+
/** Forward slash */
|
|
1116
|
+
SLASH: string;
|
|
1117
|
+
};
|
|
1118
|
+
/**
|
|
1119
|
+
* Convert lane name to kebab-case using change-case library
|
|
1120
|
+
*
|
|
1121
|
+
* Provides null-safe wrapper around paramCase for lane naming.
|
|
1122
|
+
* Handles sub-lanes with colon separator and special characters.
|
|
1123
|
+
*
|
|
1124
|
+
* @param {string|null|undefined} lane - Lane name (e.g., 'Operations: Tooling')
|
|
1125
|
+
* @returns {string} Kebab-case lane (e.g., 'operations-tooling')
|
|
1126
|
+
*
|
|
1127
|
+
* @example
|
|
1128
|
+
* toKebab('Operations: Tooling') // 'operations-tooling'
|
|
1129
|
+
* toKebab('Core Systems') // 'core-systems'
|
|
1130
|
+
* toKebab('Intelligence') // 'intelligence'
|
|
1131
|
+
* toKebab(null) // ''
|
|
1132
|
+
* toKebab(undefined) // ''
|
|
1133
|
+
*/
|
|
1134
|
+
export declare function toKebab(lane: any): string;
|
|
1135
|
+
/**
|
|
1136
|
+
* Generate worktree path from lane and WU ID
|
|
1137
|
+
*
|
|
1138
|
+
* @param {string} lane - Lane name
|
|
1139
|
+
* @param {string} id - WU ID
|
|
1140
|
+
* @returns {string} Worktree path (e.g., 'worktrees/operations-tooling-wu-123')
|
|
1141
|
+
*/
|
|
1142
|
+
export declare function getWorktreePath(lane: any, id: any): string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Generate lane branch name from lane and WU ID
|
|
1145
|
+
*
|
|
1146
|
+
* @param {string} lane - Lane name
|
|
1147
|
+
* @param {string} id - WU ID
|
|
1148
|
+
* @returns {string} Branch name (e.g., 'lane/operations-tooling/wu-123')
|
|
1149
|
+
*/
|
|
1150
|
+
export declare function getLaneBranch(lane: any, id: any): string;
|
|
1151
|
+
/**
|
|
1152
|
+
* File tool constants (WU-1403)
|
|
1153
|
+
*
|
|
1154
|
+
* Centralized strings for file:read, file:write, file:edit tools.
|
|
1155
|
+
* Prevents duplicate string literals and hardcoded magic values.
|
|
1156
|
+
*/
|
|
1157
|
+
export declare const FILE_TOOLS: {
|
|
1158
|
+
/** Tool name prefixes */
|
|
1159
|
+
NAMES: {
|
|
1160
|
+
READ: string;
|
|
1161
|
+
WRITE: string;
|
|
1162
|
+
EDIT: string;
|
|
1163
|
+
DELETE: string;
|
|
1164
|
+
};
|
|
1165
|
+
/** Tool domain */
|
|
1166
|
+
DOMAIN: string;
|
|
1167
|
+
/** Permission levels */
|
|
1168
|
+
PERMISSIONS: {
|
|
1169
|
+
READ: string;
|
|
1170
|
+
WRITE: string;
|
|
1171
|
+
};
|
|
1172
|
+
/** Worktree instruction templates (WU-1403: provides reusable instruction strings) */
|
|
1173
|
+
WORKTREE_INSTRUCTIONS: {
|
|
1174
|
+
CLAIM_COMMAND: string;
|
|
1175
|
+
CD_COMMAND: string;
|
|
1176
|
+
DOC_REFERENCE: string;
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
/**
|
|
1180
|
+
* PHI (Protected Health Information) error codes (WU-1404)
|
|
1181
|
+
*
|
|
1182
|
+
* Error codes for PHI detection in file tools.
|
|
1183
|
+
* Used by file:write and file:edit to block PHI leakage.
|
|
1184
|
+
*/
|
|
1185
|
+
export declare const PHI_ERRORS: {
|
|
1186
|
+
/** PHI detected in content - write blocked */
|
|
1187
|
+
PHI_DETECTED: string;
|
|
1188
|
+
/** PHI override requested - audit logged */
|
|
1189
|
+
PHI_OVERRIDE_ALLOWED: string;
|
|
1190
|
+
};
|
|
1191
|
+
/**
|
|
1192
|
+
* Readiness summary UI constants (WU-1620)
|
|
1193
|
+
*
|
|
1194
|
+
* Constants for the readiness summary box displayed after wu:create and wu:edit.
|
|
1195
|
+
* Provides visual feedback on whether WU is ready for wu:claim.
|
|
1196
|
+
*
|
|
1197
|
+
* @see tools/wu-create.mjs - displayReadinessSummary()
|
|
1198
|
+
* @see tools/wu-edit.mjs - displayReadinessSummary()
|
|
1199
|
+
*/
|
|
1200
|
+
export declare const READINESS_UI: {
|
|
1201
|
+
/** Box width (inner content area) */
|
|
1202
|
+
BOX_WIDTH: number;
|
|
1203
|
+
/** Box drawing characters */
|
|
1204
|
+
BOX: {
|
|
1205
|
+
TOP_LEFT: string;
|
|
1206
|
+
TOP_RIGHT: string;
|
|
1207
|
+
BOTTOM_LEFT: string;
|
|
1208
|
+
BOTTOM_RIGHT: string;
|
|
1209
|
+
HORIZONTAL: string;
|
|
1210
|
+
VERTICAL: string;
|
|
1211
|
+
};
|
|
1212
|
+
/** Status messages */
|
|
1213
|
+
MESSAGES: {
|
|
1214
|
+
READY_YES: string;
|
|
1215
|
+
READY_NO: string;
|
|
1216
|
+
MISSING_HEADER: string;
|
|
1217
|
+
BULLET: string;
|
|
1218
|
+
};
|
|
1219
|
+
/** Error truncation length */
|
|
1220
|
+
ERROR_MAX_LENGTH: number;
|
|
1221
|
+
ERROR_TRUNCATE_LENGTH: number;
|
|
1222
|
+
TRUNCATION_SUFFIX: string;
|
|
1223
|
+
/** Padding calculations (relative to BOX_WIDTH) */
|
|
1224
|
+
PADDING: {
|
|
1225
|
+
READY_YES: number;
|
|
1226
|
+
READY_NO: number;
|
|
1227
|
+
MISSING_HEADER: number;
|
|
1228
|
+
ERROR_BULLET: number;
|
|
1229
|
+
};
|
|
1230
|
+
};
|
|
1231
|
+
/**
|
|
1232
|
+
* Get project root directory from a module URL
|
|
1233
|
+
*
|
|
1234
|
+
* WU-923: Centralized path resolution to eliminate '../..' magic strings
|
|
1235
|
+
*
|
|
1236
|
+
* @param {string} moduleUrl - import.meta.url of the calling module
|
|
1237
|
+
* @returns {string} Absolute path to project root
|
|
1238
|
+
*
|
|
1239
|
+
* @example
|
|
1240
|
+
* import { getProjectRoot } from './lib/wu-constants.js';
|
|
1241
|
+
* const projectRoot = getProjectRoot(import.meta.url);
|
|
1242
|
+
*/
|
|
1243
|
+
export declare function getProjectRoot(moduleUrl: any): string;
|
|
1244
|
+
/**
|
|
1245
|
+
* Options for discovering safety tests
|
|
1246
|
+
*/
|
|
1247
|
+
export interface DiscoverSafetyTestsOptions {
|
|
1248
|
+
/** Project root directory */
|
|
1249
|
+
projectRoot?: string;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Discover safety-critical test files
|
|
1253
|
+
*
|
|
1254
|
+
* WU-2242: Scans for test files matching safety-critical patterns.
|
|
1255
|
+
* Uses glob to find all matching files.
|
|
1256
|
+
*
|
|
1257
|
+
* @param {DiscoverSafetyTestsOptions} options - Discovery options
|
|
1258
|
+
* @returns {Promise<string[]>} List of discovered test file paths
|
|
1259
|
+
*/
|
|
1260
|
+
export declare function discoverSafetyTests(options?: DiscoverSafetyTestsOptions): Promise<any[]>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Validate that required safety-critical tests exist
|
|
1263
|
+
*
|
|
1264
|
+
* WU-2242: Checks that each pattern category has at least one matching test file.
|
|
1265
|
+
* Returns a validation result with missing patterns and found files.
|
|
1266
|
+
*
|
|
1267
|
+
* @param {DiscoverSafetyTestsOptions} options - Validation options
|
|
1268
|
+
* @returns {Promise<{valid: boolean, missingTests: string[], foundTests: string[], error?: string}>}
|
|
1269
|
+
*/
|
|
1270
|
+
export declare function validateSafetyTestsExist(options?: DiscoverSafetyTestsOptions): Promise<{
|
|
1271
|
+
valid: boolean;
|
|
1272
|
+
missingTests: any[];
|
|
1273
|
+
foundTests: any[];
|
|
1274
|
+
error: string;
|
|
1275
|
+
}>;
|