@lumenflow/cli 1.3.3 → 1.3.5
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/__tests__/release.test.js +137 -0
- package/dist/agent-issues-query.js +3 -2
- package/dist/agent-log-issue.js +2 -2
- package/dist/agent-session-end.js +0 -0
- package/dist/agent-session.js +0 -0
- package/dist/flow-bottlenecks.js +0 -0
- package/dist/flow-report.js +0 -0
- package/dist/gates.js +0 -0
- package/dist/init.js +1 -1
- package/dist/initiative-add-wu.js +0 -0
- package/dist/initiative-bulk-assign-wus.js +0 -0
- package/dist/initiative-create.js +0 -0
- package/dist/initiative-edit.js +0 -0
- package/dist/initiative-list.js +0 -0
- package/dist/initiative-status.js +0 -0
- package/dist/mem-checkpoint.js +3 -7
- package/dist/mem-cleanup.js +2 -6
- package/dist/mem-create.js +3 -7
- package/dist/mem-inbox.js +3 -7
- package/dist/mem-init.js +5 -9
- package/dist/mem-ready.js +3 -7
- package/dist/mem-signal.js +3 -7
- package/dist/mem-start.js +3 -7
- package/dist/mem-summarize.js +2 -6
- package/dist/mem-triage.js +2 -6
- package/dist/metrics-snapshot.js +2 -2
- package/dist/orchestrate-init-status.js +3 -4
- package/dist/orchestrate-initiative.js +0 -0
- package/dist/orchestrate-monitor.js +4 -5
- package/dist/release.js +310 -0
- package/dist/spawn-list.js +3 -3
- package/dist/wu-block.js +2 -2
- package/dist/wu-claim.js +9 -4
- package/dist/wu-cleanup.js +0 -0
- package/dist/wu-create.js +1 -1
- package/dist/wu-delete.js +0 -0
- package/dist/wu-deps.js +0 -0
- package/dist/wu-done.js +17 -17
- package/dist/wu-edit.js +0 -0
- package/dist/wu-infer-lane.js +0 -0
- package/dist/wu-preflight.js +0 -0
- package/dist/wu-prune.js +0 -0
- package/dist/wu-repair.js +3 -3
- package/dist/wu-spawn.js +6 -6
- package/dist/wu-unblock.js +2 -2
- package/dist/wu-unlock-lane.js +0 -0
- package/dist/wu-validate.js +0 -0
- package/package.json +17 -16
- package/dist/gates.d.ts +0 -41
- package/dist/gates.d.ts.map +0 -1
- package/dist/gates.js.map +0 -1
- package/dist/initiative-add-wu.d.ts +0 -22
- package/dist/initiative-add-wu.d.ts.map +0 -1
- package/dist/initiative-add-wu.js.map +0 -1
- package/dist/initiative-create.d.ts +0 -28
- package/dist/initiative-create.d.ts.map +0 -1
- package/dist/initiative-create.js.map +0 -1
- package/dist/initiative-edit.d.ts +0 -34
- package/dist/initiative-edit.d.ts.map +0 -1
- package/dist/initiative-edit.js.map +0 -1
- package/dist/initiative-list.d.ts +0 -12
- package/dist/initiative-list.d.ts.map +0 -1
- package/dist/initiative-list.js.map +0 -1
- package/dist/initiative-status.d.ts +0 -11
- package/dist/initiative-status.d.ts.map +0 -1
- package/dist/initiative-status.js.map +0 -1
- package/dist/mem-checkpoint.d.ts +0 -16
- package/dist/mem-checkpoint.d.ts.map +0 -1
- package/dist/mem-checkpoint.js.map +0 -1
- package/dist/mem-cleanup.d.ts +0 -29
- package/dist/mem-cleanup.d.ts.map +0 -1
- package/dist/mem-cleanup.js.map +0 -1
- package/dist/mem-create.d.ts +0 -17
- package/dist/mem-create.d.ts.map +0 -1
- package/dist/mem-create.js.map +0 -1
- package/dist/mem-inbox.d.ts +0 -35
- package/dist/mem-inbox.d.ts.map +0 -1
- package/dist/mem-inbox.js.map +0 -1
- package/dist/mem-init.d.ts +0 -15
- package/dist/mem-init.d.ts.map +0 -1
- package/dist/mem-init.js.map +0 -1
- package/dist/mem-ready.d.ts +0 -16
- package/dist/mem-ready.d.ts.map +0 -1
- package/dist/mem-ready.js.map +0 -1
- package/dist/mem-signal.d.ts +0 -16
- package/dist/mem-signal.d.ts.map +0 -1
- package/dist/mem-signal.js.map +0 -1
- package/dist/mem-start.d.ts +0 -16
- package/dist/mem-start.d.ts.map +0 -1
- package/dist/mem-start.js.map +0 -1
- package/dist/mem-summarize.d.ts +0 -22
- package/dist/mem-summarize.d.ts.map +0 -1
- package/dist/mem-summarize.js.map +0 -1
- package/dist/mem-triage.d.ts +0 -22
- package/dist/mem-triage.d.ts.map +0 -1
- package/dist/mem-triage.js.map +0 -1
- package/dist/spawn-list.d.ts +0 -16
- package/dist/spawn-list.d.ts.map +0 -1
- package/dist/spawn-list.js.map +0 -1
- package/dist/wu-block.d.ts +0 -16
- package/dist/wu-block.d.ts.map +0 -1
- package/dist/wu-block.js.map +0 -1
- package/dist/wu-claim.d.ts +0 -32
- package/dist/wu-claim.d.ts.map +0 -1
- package/dist/wu-claim.js.map +0 -1
- package/dist/wu-cleanup.d.ts +0 -17
- package/dist/wu-cleanup.d.ts.map +0 -1
- package/dist/wu-cleanup.js.map +0 -1
- package/dist/wu-create.d.ts +0 -38
- package/dist/wu-create.d.ts.map +0 -1
- package/dist/wu-create.js.map +0 -1
- package/dist/wu-deps.d.ts +0 -13
- package/dist/wu-deps.d.ts.map +0 -1
- package/dist/wu-deps.js.map +0 -1
- package/dist/wu-done.d.ts +0 -153
- package/dist/wu-done.d.ts.map +0 -1
- package/dist/wu-done.js.map +0 -1
- package/dist/wu-edit.d.ts +0 -29
- package/dist/wu-edit.d.ts.map +0 -1
- package/dist/wu-edit.js.map +0 -1
- package/dist/wu-infer-lane.d.ts +0 -17
- package/dist/wu-infer-lane.d.ts.map +0 -1
- package/dist/wu-infer-lane.js.map +0 -1
- package/dist/wu-preflight.d.ts +0 -47
- package/dist/wu-preflight.d.ts.map +0 -1
- package/dist/wu-preflight.js.map +0 -1
- package/dist/wu-prune.d.ts +0 -16
- package/dist/wu-prune.d.ts.map +0 -1
- package/dist/wu-prune.js.map +0 -1
- package/dist/wu-repair.d.ts +0 -60
- package/dist/wu-repair.d.ts.map +0 -1
- package/dist/wu-repair.js.map +0 -1
- package/dist/wu-spawn-completion.d.ts +0 -10
- package/dist/wu-spawn.d.ts +0 -168
- package/dist/wu-spawn.d.ts.map +0 -1
- package/dist/wu-spawn.js.map +0 -1
- package/dist/wu-unblock.d.ts +0 -16
- package/dist/wu-unblock.d.ts.map +0 -1
- package/dist/wu-unblock.js.map +0 -1
- package/dist/wu-validate.d.ts +0 -16
- package/dist/wu-validate.d.ts.map +0 -1
- package/dist/wu-validate.js.map +0 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for release command
|
|
3
|
+
*
|
|
4
|
+
* Verifies that the release command:
|
|
5
|
+
* - Validates version format (semver)
|
|
6
|
+
* - Bumps all @lumenflow/* package versions
|
|
7
|
+
* - Uses micro-worktree isolation for version commit
|
|
8
|
+
* - Builds all packages
|
|
9
|
+
* - Publishes to npm with proper auth
|
|
10
|
+
* - Creates git tag vX.Y.Z
|
|
11
|
+
*
|
|
12
|
+
* WU-1074: Add release command for npm publishing
|
|
13
|
+
*/
|
|
14
|
+
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
15
|
+
import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
16
|
+
import { join } from 'node:path';
|
|
17
|
+
import { tmpdir } from 'node:os';
|
|
18
|
+
// Import functions under test
|
|
19
|
+
import { validateSemver, findPackageJsonPaths, updatePackageVersions, buildCommitMessage, buildTagName, } from '../release.js';
|
|
20
|
+
describe('release command', () => {
|
|
21
|
+
describe('validateSemver', () => {
|
|
22
|
+
it('should accept valid semver versions', () => {
|
|
23
|
+
expect(validateSemver('1.0.0')).toBe(true);
|
|
24
|
+
expect(validateSemver('1.2.3')).toBe(true);
|
|
25
|
+
expect(validateSemver('10.20.30')).toBe(true);
|
|
26
|
+
expect(validateSemver('0.0.1')).toBe(true);
|
|
27
|
+
});
|
|
28
|
+
it('should accept semver with pre-release identifiers', () => {
|
|
29
|
+
expect(validateSemver('1.0.0-alpha')).toBe(true);
|
|
30
|
+
expect(validateSemver('1.0.0-beta.1')).toBe(true);
|
|
31
|
+
expect(validateSemver('1.0.0-rc.1')).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
it('should reject invalid versions', () => {
|
|
34
|
+
expect(validateSemver('1')).toBe(false);
|
|
35
|
+
expect(validateSemver('1.0')).toBe(false);
|
|
36
|
+
expect(validateSemver('v1.0.0')).toBe(false);
|
|
37
|
+
expect(validateSemver('1.0.0.0')).toBe(false);
|
|
38
|
+
expect(validateSemver('abc')).toBe(false);
|
|
39
|
+
expect(validateSemver('')).toBe(false);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
describe('findPackageJsonPaths', () => {
|
|
43
|
+
let testDir;
|
|
44
|
+
beforeEach(() => {
|
|
45
|
+
// Create temp directory for test packages
|
|
46
|
+
testDir = join(tmpdir(), `release-test-${Date.now()}`);
|
|
47
|
+
mkdirSync(testDir, { recursive: true });
|
|
48
|
+
});
|
|
49
|
+
afterEach(() => {
|
|
50
|
+
// Clean up temp directory
|
|
51
|
+
rmSync(testDir, { recursive: true, force: true });
|
|
52
|
+
});
|
|
53
|
+
it('should find all @lumenflow/* package.json files', () => {
|
|
54
|
+
// Create mock package structure
|
|
55
|
+
const packagesDir = join(testDir, 'packages/@lumenflow');
|
|
56
|
+
mkdirSync(join(packagesDir, 'core'), { recursive: true });
|
|
57
|
+
mkdirSync(join(packagesDir, 'cli'), { recursive: true });
|
|
58
|
+
mkdirSync(join(packagesDir, 'memory'), { recursive: true });
|
|
59
|
+
writeFileSync(join(packagesDir, 'core/package.json'), JSON.stringify({ name: '@lumenflow/core', version: '1.0.0' }));
|
|
60
|
+
writeFileSync(join(packagesDir, 'cli/package.json'), JSON.stringify({ name: '@lumenflow/cli', version: '1.0.0' }));
|
|
61
|
+
writeFileSync(join(packagesDir, 'memory/package.json'), JSON.stringify({ name: '@lumenflow/memory', version: '1.0.0' }));
|
|
62
|
+
const paths = findPackageJsonPaths(testDir);
|
|
63
|
+
expect(paths).toHaveLength(3);
|
|
64
|
+
expect(paths).toContain(join(packagesDir, 'core/package.json'));
|
|
65
|
+
expect(paths).toContain(join(packagesDir, 'cli/package.json'));
|
|
66
|
+
expect(paths).toContain(join(packagesDir, 'memory/package.json'));
|
|
67
|
+
});
|
|
68
|
+
it('should not include packages with private: true', () => {
|
|
69
|
+
// Create mock package structure with private package
|
|
70
|
+
const packagesDir = join(testDir, 'packages/@lumenflow');
|
|
71
|
+
mkdirSync(join(packagesDir, 'core'), { recursive: true });
|
|
72
|
+
mkdirSync(join(packagesDir, 'internal'), { recursive: true });
|
|
73
|
+
writeFileSync(join(packagesDir, 'core/package.json'), JSON.stringify({ name: '@lumenflow/core', version: '1.0.0' }));
|
|
74
|
+
writeFileSync(join(packagesDir, 'internal/package.json'), JSON.stringify({ name: '@lumenflow/internal', version: '1.0.0', private: true }));
|
|
75
|
+
const paths = findPackageJsonPaths(testDir);
|
|
76
|
+
expect(paths).toHaveLength(1);
|
|
77
|
+
expect(paths).toContain(join(packagesDir, 'core/package.json'));
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe('updatePackageVersions', () => {
|
|
81
|
+
let testDir;
|
|
82
|
+
beforeEach(() => {
|
|
83
|
+
testDir = join(tmpdir(), `release-test-${Date.now()}`);
|
|
84
|
+
mkdirSync(testDir, { recursive: true });
|
|
85
|
+
});
|
|
86
|
+
afterEach(() => {
|
|
87
|
+
rmSync(testDir, { recursive: true, force: true });
|
|
88
|
+
});
|
|
89
|
+
it('should update version in all package.json files', async () => {
|
|
90
|
+
// Create mock package.json
|
|
91
|
+
const packagePath = join(testDir, 'package.json');
|
|
92
|
+
writeFileSync(packagePath, JSON.stringify({
|
|
93
|
+
name: '@lumenflow/core',
|
|
94
|
+
version: '1.0.0',
|
|
95
|
+
description: 'Core package',
|
|
96
|
+
}, null, 2));
|
|
97
|
+
await updatePackageVersions([packagePath], '1.2.3');
|
|
98
|
+
// Read back and verify
|
|
99
|
+
const content = JSON.parse(await import('node:fs/promises').then((fs) => fs.readFile(packagePath, 'utf-8')));
|
|
100
|
+
expect(content.version).toBe('1.2.3');
|
|
101
|
+
expect(content.name).toBe('@lumenflow/core'); // Other fields preserved
|
|
102
|
+
});
|
|
103
|
+
it('should preserve JSON formatting', async () => {
|
|
104
|
+
// Create mock package.json with specific formatting
|
|
105
|
+
const packagePath = join(testDir, 'package.json');
|
|
106
|
+
writeFileSync(packagePath, JSON.stringify({ name: '@lumenflow/core', version: '1.0.0' }, null, 2) + '\n');
|
|
107
|
+
await updatePackageVersions([packagePath], '1.2.3');
|
|
108
|
+
// Read back raw content and check formatting
|
|
109
|
+
const content = await import('node:fs/promises').then((fs) => fs.readFile(packagePath, 'utf-8'));
|
|
110
|
+
expect(content).toMatch(/{\n "name"/); // Preserve 2-space indent
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
describe('buildCommitMessage', () => {
|
|
114
|
+
it('should build correct commit message for version bump', () => {
|
|
115
|
+
const message = buildCommitMessage('1.3.0');
|
|
116
|
+
expect(message).toBe('chore: bump all packages to v1.3.0');
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
describe('buildTagName', () => {
|
|
120
|
+
it('should build correct tag name', () => {
|
|
121
|
+
expect(buildTagName('1.3.0')).toBe('v1.3.0');
|
|
122
|
+
expect(buildTagName('1.0.0-beta.1')).toBe('v1.0.0-beta.1');
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
describe('release command integration', () => {
|
|
127
|
+
// These tests verify the command exists and parses arguments correctly
|
|
128
|
+
// They don't actually run the full release process
|
|
129
|
+
it('should export main function from release.ts', async () => {
|
|
130
|
+
// This test verifies the module structure exists
|
|
131
|
+
const module = await import('../release.js');
|
|
132
|
+
expect(module).toBeDefined();
|
|
133
|
+
expect(typeof module.validateSemver).toBe('function');
|
|
134
|
+
expect(typeof module.findPackageJsonPaths).toBe('function');
|
|
135
|
+
expect(typeof module.updatePackageVersions).toBe('function');
|
|
136
|
+
});
|
|
137
|
+
});
|
|
@@ -19,12 +19,13 @@ import { join } from 'node:path';
|
|
|
19
19
|
import { Command } from 'commander';
|
|
20
20
|
import chalk from 'chalk';
|
|
21
21
|
import { die } from '@lumenflow/core/dist/error-handler.js';
|
|
22
|
+
import { LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
22
23
|
/** Log prefix for console output */
|
|
23
24
|
const LOG_PREFIX = '[agent:issues-query]';
|
|
24
25
|
/** Default days to query */
|
|
25
26
|
const DEFAULT_SINCE_DAYS = 7;
|
|
26
|
-
/** Issues log file path */
|
|
27
|
-
const ISSUES_LOG_PATH =
|
|
27
|
+
/** Issues log file path - under base .lumenflow directory */
|
|
28
|
+
const ISSUES_LOG_PATH = `${LUMENFLOW_PATHS.BASE}/agent-issues.ndjson`;
|
|
28
29
|
/** Valid severity levels */
|
|
29
30
|
const SEVERITY_LEVELS = ['blocker', 'major', 'minor', 'trivial'];
|
|
30
31
|
/**
|
package/dist/agent-log-issue.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { Command } from 'commander';
|
|
11
11
|
import { logIncident, getCurrentSession } from '@lumenflow/agent';
|
|
12
|
-
import { EXIT_CODES, INCIDENT_SEVERITY } from '@lumenflow/core/dist/wu-constants.js';
|
|
12
|
+
import { EXIT_CODES, INCIDENT_SEVERITY, LUMENFLOW_PATHS, } from '@lumenflow/core/dist/wu-constants.js';
|
|
13
13
|
import chalk from 'chalk';
|
|
14
14
|
const program = new Command()
|
|
15
15
|
.name('agent:log-issue')
|
|
@@ -46,7 +46,7 @@ const program = new Command()
|
|
|
46
46
|
console.log(chalk.green(`✓ Issue logged`));
|
|
47
47
|
console.log(` Category: ${chalk.cyan(opts.category)}`);
|
|
48
48
|
console.log(` Severity: ${chalk.cyan(opts.severity)}`);
|
|
49
|
-
console.log(` File: ${chalk.gray(
|
|
49
|
+
console.log(` File: ${chalk.gray(`${LUMENFLOW_PATHS.INCIDENTS}/${opts.category}.ndjson`)}`);
|
|
50
50
|
if (opts.severity === INCIDENT_SEVERITY.MAJOR ||
|
|
51
51
|
opts.severity === INCIDENT_SEVERITY.BLOCKER) {
|
|
52
52
|
console.log();
|
|
File without changes
|
package/dist/agent-session.js
CHANGED
|
File without changes
|
package/dist/flow-bottlenecks.js
CHANGED
|
File without changes
|
package/dist/flow-report.js
CHANGED
|
File without changes
|
package/dist/gates.js
CHANGED
|
File without changes
|
package/dist/init.js
CHANGED
|
@@ -113,7 +113,7 @@ const BACKLOG_TEMPLATE = `---\nsections:\n ready:\n heading: '## 🚀 Ready
|
|
|
113
113
|
// Template for docs/04-operations/tasks/status.md
|
|
114
114
|
const STATUS_TEMPLATE = `# Status (active work)\n\n## In Progress\n\n(No items in progress)\n\n## Blocked\n\n(No items blocked)\n\n## Completed\n\n(No items completed yet)\n`;
|
|
115
115
|
// Template for docs/04-operations/tasks/templates/wu-template.yaml
|
|
116
|
-
const WU_TEMPLATE_YAML = `# Work Unit Template (LumenFlow WU Schema)\n#\n# Copy this template when creating new WUs. Fill in all required fields and\n# remove optional fields if not needed.\n#\n# If you used "lumenflow init --full", this template lives at:\n# docs/04-operations/tasks/templates/wu-template.yaml\n\n# Required: Unique work unit identifier (format: WU-NNN)\nid: WU-XXX\n\n# Required: Short, descriptive title (max 80 chars)\ntitle: 'Your WU title here'\n\n# Required: Lane (Parent: Sublane format)\nlane: 'Framework: CLI'\n\n# Required: Type of work\ntype: 'feature' # feature | bug | documentation | process | tooling | chore | refactor\n\n# Required: Current status\nstatus: 'ready' # ready | in_progress | blocked | done | cancelled\n\n# Required: Priority\npriority: P2 # P0 | P1 | P2 | P3\n\n# Required: Creation date (YYYY-MM-DD)\ncreated: {{DATE}}\n\n# Required: Owner/assignee (email)\nassigned_to: 'unassigned@example.com'\n\n# Required: Description\ndescription: |\n Context: ...\n Problem: ...\n Solution: ...\n\n# Required: Acceptance criteria (testable, binary)\nacceptance:\n - Criterion 1 (specific, measurable, testable)\n - Criterion 2 (binary pass/fail)\n - Documentation updated\n\n# Required: References to plans/specs (required for type: feature)\nspec_refs:\n - docs/04-operations/plans/WU-XXX-plan.md\n\n# Required: Code files changed or created (empty only for docs/process WUs)\ncode_paths:\n - path/to/file.ts\n\n# Required: Test paths (at least one of manual/unit/e2e/integration for non-doc WUs)\ntests:\n manual:\n - Manual test: Verify behavior\n unit:\n - path/to/test.test.ts\n e2e: []\n integration: []\n\n# Required: Exposure level\nexposure: 'backend-only' # ui | api | backend-only | documentation\n\n# Optional: User journey (recommended for ui/api)\n# user_journey: |\n# User navigates to ...\n# User performs ...\n\n# Optional: UI pairing WUs (for api exposure)\n# ui_pairing_wus:\n# - WU-1234\n\n# Optional: Navigation path (required when exposure=ui and no page file)\n# navigation_path: '/settings'\n\n# Required: Deliverable artifacts (stamps, docs, etc.)\nartifacts:\n - .
|
|
116
|
+
const WU_TEMPLATE_YAML = `# Work Unit Template (LumenFlow WU Schema)\n#\n# Copy this template when creating new WUs. Fill in all required fields and\n# remove optional fields if not needed.\n#\n# If you used "lumenflow init --full", this template lives at:\n# docs/04-operations/tasks/templates/wu-template.yaml\n\n# Required: Unique work unit identifier (format: WU-NNN)\nid: WU-XXX\n\n# Required: Short, descriptive title (max 80 chars)\ntitle: 'Your WU title here'\n\n# Required: Lane (Parent: Sublane format)\nlane: 'Framework: CLI'\n\n# Required: Type of work\ntype: 'feature' # feature | bug | documentation | process | tooling | chore | refactor\n\n# Required: Current status\nstatus: 'ready' # ready | in_progress | blocked | done | cancelled\n\n# Required: Priority\npriority: P2 # P0 | P1 | P2 | P3\n\n# Required: Creation date (YYYY-MM-DD)\ncreated: {{DATE}}\n\n# Required: Owner/assignee (email)\nassigned_to: 'unassigned@example.com'\n\n# Required: Description\ndescription: |\n Context: ...\n Problem: ...\n Solution: ...\n\n# Required: Acceptance criteria (testable, binary)\nacceptance:\n - Criterion 1 (specific, measurable, testable)\n - Criterion 2 (binary pass/fail)\n - Documentation updated\n\n# Required: References to plans/specs (required for type: feature)\nspec_refs:\n - docs/04-operations/plans/WU-XXX-plan.md\n\n# Required: Code files changed or created (empty only for docs/process WUs)\ncode_paths:\n - path/to/file.ts\n\n# Required: Test paths (at least one of manual/unit/e2e/integration for non-doc WUs)\ntests:\n manual:\n - Manual test: Verify behavior\n unit:\n - path/to/test.test.ts\n e2e: []\n integration: []\n\n# Required: Exposure level\nexposure: 'backend-only' # ui | api | backend-only | documentation\n\n# Optional: User journey (recommended for ui/api)\n# user_journey: |\n# User navigates to ...\n# User performs ...\n\n# Optional: UI pairing WUs (for api exposure)\n# ui_pairing_wus:\n# - WU-1234\n\n# Optional: Navigation path (required when exposure=ui and no page file)\n# navigation_path: '/settings'\n\n# Required: Deliverable artifacts (stamps, docs, etc.)\nartifacts:\n - .lumenflow/stamps/WU-XXX.done\n\n# Optional: Dependencies (other WUs that must complete first)\ndependencies: []\n\n# Optional: Risks\nrisks:\n - Risk 1\n\n# Optional: Notes\nnotes: ''\n\n# Optional: Requires human review\nrequires_review: false\n\n# Optional: Claimed mode (worktree or branch-only)\n# Automatically set by wu:claim, usually don't need to specify\n# claimed_mode: worktree\n\n# Optional: Assigned to (email of current claimant)\n# Automatically set by wu:claim\n# assigned_to: engineer@example.com\n\n# Optional: Locked status (prevents concurrent edits)\n# Automatically set by wu:claim and wu:done\n# locked: false\n\n# Optional: Completion date (ISO 8601 format)\n# Automatically set by wu:done\n# completed: 2025-10-23\n\n# Optional: Completion notes (added by wu:done)\n# completion_notes: |\n# Additional notes added during wu:done.\n# Any deviations from original plan.\n# Lessons learned.\n\n# ============================================================================\n# GOVERNANCE BLOCK (WU Schema v2.0)\n# ============================================================================\n# Optional: COS governance rules that apply to this WU\n# Only include if this WU needs specific governance enforcement\n\n# governance:\n# # Rules that apply to this WU (evaluated during cos:gates)\n# rules:\n# - rule_id: UPAIN-01\n# satisfied: false # Initially false, set true when evidence provided\n# evidence:\n# - type: link\n# value: docs/product/voc/feature-user-pain.md\n# description: "Voice of Customer analysis showing user pain"\n# notes: |\n# VOC analysis shows 40% of support tickets request this feature.\n# Average time wasted: 15min/user/week.\n#\n# - rule_id: CASH-03\n# satisfied: false\n# evidence:\n# - type: link\n# value: docs/finance/spend-reviews/2025-10-cloud-infra.md\n# description: "Spend review for £1200/month cloud infrastructure"\n# - type: approval\n# value: owner@example.com\n# description: "Owner approval for spend commitment"\n# notes: |\n# New cloud infrastructure commitment: £1200/month for 12 months.\n# ROI: Reduces latency by 50%, improves user retention.\n#\n# # Gate checks (enforced by cos-gates.mjs)\n# gates:\n# narrative: "pending" # Status: pending, passed, skipped, failed\n# finance: "pending"\n#\n# # Exemptions (only if rule doesn't apply)\n# exemptions:\n# - rule_id: FAIR-01\n# reason: "No user-facing pricing changes in this WU"\n# approved_by: product-owner@example.com\n# approved_at: 2025-10-23\n\n# ============================================================================\n# USAGE NOTES\n# ============================================================================\n#\n# 1. Remove this entire governance block if no COS rules apply to your WU\n# 2. Only include rules that require enforcement (not all rules apply to all WUs)\n# 3. Evidence types: link:, metric:, screenshot:, approval:\n# 4. Gates are checked during wu:done (before merge)\n# 5. Exemptions require approval from rule owner\n#\n# For more details, see:\n# - docs/04-operations/_frameworks/cos/system-prompt-v1.3.md\n# - docs/04-operations/_frameworks/cos/evidence-format.md\n`;
|
|
117
117
|
// Template for .lumenflow.framework.yaml
|
|
118
118
|
const FRAMEWORK_HINT_TEMPLATE = `# LumenFlow Framework Hint\n# Generated by: lumenflow init --framework {{FRAMEWORK_NAME}}\n\nframework: "{{FRAMEWORK_NAME}}"\nslug: "{{FRAMEWORK_SLUG}}"\n`;
|
|
119
119
|
// Template for docs/04-operations/_frameworks/<framework>/README.md
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/initiative-edit.js
CHANGED
|
File without changes
|
package/dist/initiative-list.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/mem-checkpoint.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Create a checkpoint node for context snapshots.
|
|
6
6
|
* Used before /clear or session handoff to preserve progress state.
|
|
7
7
|
*
|
|
8
|
-
* Includes audit logging to .
|
|
8
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
11
|
* pnpm mem:checkpoint 'note' [--session <id>] [--wu <id>] [--progress <text>] [--next-steps <text>] [--trigger <type>] [--quiet]
|
|
@@ -17,7 +17,7 @@ import fs from 'node:fs/promises';
|
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { createCheckpoint } from '@lumenflow/memory/dist/mem-checkpoint-core.js';
|
|
19
19
|
import { createWUParser, WU_OPTIONS } from '@lumenflow/core/dist/arg-parser.js';
|
|
20
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
20
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
21
21
|
/**
|
|
22
22
|
* Log prefix for mem:checkpoint output
|
|
23
23
|
*/
|
|
@@ -26,10 +26,6 @@ const LOG_PREFIX = '[mem:checkpoint]';
|
|
|
26
26
|
* Tool name for audit logging
|
|
27
27
|
*/
|
|
28
28
|
const TOOL_NAME = 'mem:checkpoint';
|
|
29
|
-
/**
|
|
30
|
-
* Audit log file path
|
|
31
|
-
*/
|
|
32
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
33
29
|
/**
|
|
34
30
|
* CLI argument options specific to mem:checkpoint
|
|
35
31
|
*/
|
|
@@ -78,7 +74,7 @@ const CLI_OPTIONS = {
|
|
|
78
74
|
*/
|
|
79
75
|
async function writeAuditLog(baseDir, entry) {
|
|
80
76
|
try {
|
|
81
|
-
const logPath = path.join(baseDir,
|
|
77
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
82
78
|
const logDir = path.dirname(logPath);
|
|
83
79
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
84
80
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-cleanup.js
CHANGED
|
@@ -30,7 +30,7 @@ import fs from 'node:fs/promises';
|
|
|
30
30
|
import path from 'node:path';
|
|
31
31
|
import { cleanupMemory } from '@lumenflow/memory/dist/mem-cleanup-core.js';
|
|
32
32
|
import { createWUParser } from '@lumenflow/core/dist/arg-parser.js';
|
|
33
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
33
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
34
34
|
/**
|
|
35
35
|
* Log prefix for mem:cleanup output
|
|
36
36
|
*/
|
|
@@ -39,10 +39,6 @@ const LOG_PREFIX = '[mem:cleanup]';
|
|
|
39
39
|
* Tool name for audit logging
|
|
40
40
|
*/
|
|
41
41
|
const TOOL_NAME = 'mem:cleanup';
|
|
42
|
-
/**
|
|
43
|
-
* Audit log file path
|
|
44
|
-
*/
|
|
45
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
46
42
|
/**
|
|
47
43
|
* Bytes per KB for formatting
|
|
48
44
|
*/
|
|
@@ -90,7 +86,7 @@ const CLI_OPTIONS = {
|
|
|
90
86
|
*/
|
|
91
87
|
async function writeAuditLog(baseDir, entry) {
|
|
92
88
|
try {
|
|
93
|
-
const logPath = path.join(baseDir,
|
|
89
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
94
90
|
const logDir = path.dirname(logPath);
|
|
95
91
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
96
92
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-create.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* KEY DIFFERENTIATOR: supports discovered-from relationship for scope-creep
|
|
7
7
|
* forensics. Creates audit trail of WHY work expanded, not just WHAT changed.
|
|
8
8
|
*
|
|
9
|
-
* Includes audit logging to .
|
|
9
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
10
10
|
*
|
|
11
11
|
* Usage:
|
|
12
12
|
* pnpm mem:create 'title' [--type <type>] [--discovered-from <id>] [--wu <id>] [--quiet]
|
|
@@ -18,7 +18,7 @@ import fs from 'node:fs/promises';
|
|
|
18
18
|
import path from 'node:path';
|
|
19
19
|
import { createMemoryNode } from '@lumenflow/memory/dist/mem-create-core.js';
|
|
20
20
|
import { createWUParser, WU_OPTIONS } from '@lumenflow/core/dist/arg-parser.js';
|
|
21
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
21
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
22
22
|
import { MEMORY_NODE_TYPES } from '@lumenflow/memory/dist/memory-schema.js';
|
|
23
23
|
/**
|
|
24
24
|
* Log prefix for mem:create output
|
|
@@ -28,10 +28,6 @@ const LOG_PREFIX = '[mem:create]';
|
|
|
28
28
|
* Tool name for audit logging
|
|
29
29
|
*/
|
|
30
30
|
const TOOL_NAME = 'mem:create';
|
|
31
|
-
/**
|
|
32
|
-
* Audit log file path
|
|
33
|
-
*/
|
|
34
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
35
31
|
/**
|
|
36
32
|
* CLI argument options specific to mem:create
|
|
37
33
|
*/
|
|
@@ -85,7 +81,7 @@ const CLI_OPTIONS = {
|
|
|
85
81
|
*/
|
|
86
82
|
async function writeAuditLog(baseDir, entry) {
|
|
87
83
|
try {
|
|
88
|
-
const logPath = path.join(baseDir,
|
|
84
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
89
85
|
const logDir = path.dirname(logPath);
|
|
90
86
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
91
87
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-inbox.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* of parallel agent progress. Filter by lane, WU, or time range.
|
|
7
7
|
* Supports watch mode for continuous monitoring.
|
|
8
8
|
*
|
|
9
|
-
* Includes audit logging to .
|
|
9
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
10
10
|
*
|
|
11
11
|
* WU-2202: Added dependency validation before operations to prevent silent
|
|
12
12
|
* failures when node_modules is corrupted or incomplete.
|
|
@@ -22,7 +22,7 @@ import path from 'node:path';
|
|
|
22
22
|
import ms from 'ms';
|
|
23
23
|
import { loadSignals, markSignalsAsRead } from '@lumenflow/memory/dist/mem-signal-core.js';
|
|
24
24
|
import { createWUParser, WU_OPTIONS } from '@lumenflow/core/dist/arg-parser.js';
|
|
25
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
25
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
26
26
|
import { validateInboxDependencies, formatDependencyError, } from '@lumenflow/core/dist/dependency-validator.js';
|
|
27
27
|
/**
|
|
28
28
|
* Log prefix for mem:inbox output
|
|
@@ -32,10 +32,6 @@ const LOG_PREFIX = '[mem:inbox]';
|
|
|
32
32
|
* Tool name for audit logging
|
|
33
33
|
*/
|
|
34
34
|
const TOOL_NAME = 'mem:inbox';
|
|
35
|
-
/**
|
|
36
|
-
* Audit log file path
|
|
37
|
-
*/
|
|
38
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
39
35
|
/**
|
|
40
36
|
* Watch mode polling interval in milliseconds
|
|
41
37
|
*/
|
|
@@ -79,7 +75,7 @@ const CLI_OPTIONS = {
|
|
|
79
75
|
*/
|
|
80
76
|
async function writeAuditLog(baseDir, entry) {
|
|
81
77
|
try {
|
|
82
|
-
const logPath = path.join(baseDir,
|
|
78
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
83
79
|
const logDir = path.dirname(logPath);
|
|
84
80
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
85
81
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-init.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Memory Init CLI (WU-1464)
|
|
4
4
|
*
|
|
5
5
|
* Initialize memory layer in the repository.
|
|
6
|
-
* Creates .
|
|
6
|
+
* Creates .lumenflow/memory/ directory with memory.jsonl and config.yaml.
|
|
7
7
|
*
|
|
8
|
-
* Includes audit logging to .
|
|
8
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
11
|
* pnpm mem:init [--base-dir <path>] [--quiet]
|
|
@@ -16,7 +16,7 @@ import fs from 'node:fs/promises';
|
|
|
16
16
|
import path from 'node:path';
|
|
17
17
|
import { initMemory } from '@lumenflow/memory/dist/mem-init-core.js';
|
|
18
18
|
import { createWUParser } from '@lumenflow/core/dist/arg-parser.js';
|
|
19
|
-
import { EXIT_CODES, STRING_LITERALS } from '@lumenflow/core/dist/wu-constants.js';
|
|
19
|
+
import { EXIT_CODES, STRING_LITERALS, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
20
20
|
/**
|
|
21
21
|
* Log prefix for mem:init output
|
|
22
22
|
*/
|
|
@@ -25,10 +25,6 @@ const LOG_PREFIX = '[mem:init]';
|
|
|
25
25
|
* Tool name for audit logging
|
|
26
26
|
*/
|
|
27
27
|
const TOOL_NAME = 'mem:init';
|
|
28
|
-
/**
|
|
29
|
-
* Audit log file path
|
|
30
|
-
*/
|
|
31
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
32
28
|
/**
|
|
33
29
|
* Write audit log entry for tool execution
|
|
34
30
|
*
|
|
@@ -37,7 +33,7 @@ const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
|
37
33
|
*/
|
|
38
34
|
async function writeAuditLog(baseDir, entry) {
|
|
39
35
|
try {
|
|
40
|
-
const logPath = path.join(baseDir,
|
|
36
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
41
37
|
const logDir = path.dirname(logPath);
|
|
42
38
|
// Ensure telemetry directory exists
|
|
43
39
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
@@ -129,7 +125,7 @@ async function main() {
|
|
|
129
125
|
console.log('');
|
|
130
126
|
console.log('Created:');
|
|
131
127
|
if (result.created.directory) {
|
|
132
|
-
console.log(' - .
|
|
128
|
+
console.log(' - .lumenflow/memory/ directory');
|
|
133
129
|
}
|
|
134
130
|
if (result.created.memoryJsonl) {
|
|
135
131
|
console.log(' - memory.jsonl (empty)');
|
package/dist/mem-ready.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Usage:
|
|
9
9
|
* pnpm mem:ready --wu WU-1234 [--type <type>] [--format <json|human>] [--quiet]
|
|
10
10
|
*
|
|
11
|
-
* Includes audit logging to .
|
|
11
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
12
12
|
*
|
|
13
13
|
* @see {@link tools/lib/mem-ready-core.mjs} - Core logic
|
|
14
14
|
* @see {@link tools/__tests__/mem-ready.test.mjs} - Tests
|
|
@@ -17,7 +17,7 @@ import fs from 'node:fs/promises';
|
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { queryReadyNodes } from '@lumenflow/memory/dist/mem-ready-core.js';
|
|
19
19
|
import { createWUParser, WU_OPTIONS } from '@lumenflow/core/dist/arg-parser.js';
|
|
20
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
20
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
21
21
|
import { MEMORY_NODE_TYPES } from '@lumenflow/memory/dist/memory-schema.js';
|
|
22
22
|
/**
|
|
23
23
|
* Log prefix for mem:ready output
|
|
@@ -27,10 +27,6 @@ const LOG_PREFIX = '[mem:ready]';
|
|
|
27
27
|
* Tool name for audit logging
|
|
28
28
|
*/
|
|
29
29
|
const TOOL_NAME = 'mem:ready';
|
|
30
|
-
/**
|
|
31
|
-
* Audit log file path
|
|
32
|
-
*/
|
|
33
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
34
30
|
/**
|
|
35
31
|
* CLI argument options specific to mem:ready
|
|
36
32
|
*/
|
|
@@ -64,7 +60,7 @@ const CLI_OPTIONS = {
|
|
|
64
60
|
*/
|
|
65
61
|
async function writeAuditLog(baseDir, entry) {
|
|
66
62
|
try {
|
|
67
|
-
const logPath = path.join(baseDir,
|
|
63
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
68
64
|
const logDir = path.dirname(logPath);
|
|
69
65
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
70
66
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-signal.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Send coordination signals between parallel agents for sub-100ms
|
|
6
6
|
* multi-agent swarm coordination without git sync latency.
|
|
7
7
|
*
|
|
8
|
-
* Includes audit logging to .
|
|
8
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
11
|
* pnpm mem:signal 'message' [--wu <id>] [--lane <name>] [--quiet]
|
|
@@ -17,7 +17,7 @@ import fs from 'node:fs/promises';
|
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { createSignal } from '@lumenflow/memory/dist/mem-signal-core.js';
|
|
19
19
|
import { createWUParser, WU_OPTIONS } from '@lumenflow/core/dist/arg-parser.js';
|
|
20
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
20
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
21
21
|
/**
|
|
22
22
|
* Log prefix for mem:signal output
|
|
23
23
|
*/
|
|
@@ -26,10 +26,6 @@ const LOG_PREFIX = '[mem:signal]';
|
|
|
26
26
|
* Tool name for audit logging
|
|
27
27
|
*/
|
|
28
28
|
const TOOL_NAME = 'mem:signal';
|
|
29
|
-
/**
|
|
30
|
-
* Audit log file path
|
|
31
|
-
*/
|
|
32
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
33
29
|
/**
|
|
34
30
|
* CLI argument options specific to mem:signal
|
|
35
31
|
*/
|
|
@@ -53,7 +49,7 @@ const CLI_OPTIONS = {
|
|
|
53
49
|
*/
|
|
54
50
|
async function writeAuditLog(baseDir, entry) {
|
|
55
51
|
try {
|
|
56
|
-
const logPath = path.join(baseDir,
|
|
52
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
57
53
|
const logDir = path.dirname(logPath);
|
|
58
54
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
59
55
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-start.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Create a session node linked to a WU.
|
|
6
6
|
* Called by wu:claim enhancement for context restoration after /clear.
|
|
7
7
|
*
|
|
8
|
-
* Includes audit logging to .
|
|
8
|
+
* Includes audit logging to .lumenflow/telemetry/tools.ndjson.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
11
|
* pnpm mem:start --wu WU-1234 [--agent-type <type>] [--context-tier <tier>] [--quiet]
|
|
@@ -17,7 +17,7 @@ import fs from 'node:fs/promises';
|
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { startSession } from '@lumenflow/memory/dist/mem-start-core.js';
|
|
19
19
|
import { createWUParser, WU_OPTIONS } from '@lumenflow/core/dist/arg-parser.js';
|
|
20
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
20
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
21
21
|
/**
|
|
22
22
|
* Log prefix for mem:start output
|
|
23
23
|
*/
|
|
@@ -26,10 +26,6 @@ const LOG_PREFIX = '[mem:start]';
|
|
|
26
26
|
* Tool name for audit logging
|
|
27
27
|
*/
|
|
28
28
|
const TOOL_NAME = 'mem:start';
|
|
29
|
-
/**
|
|
30
|
-
* Audit log file path
|
|
31
|
-
*/
|
|
32
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
33
29
|
/**
|
|
34
30
|
* Write audit log entry for tool execution
|
|
35
31
|
*
|
|
@@ -38,7 +34,7 @@ const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
|
38
34
|
*/
|
|
39
35
|
async function writeAuditLog(baseDir, entry) {
|
|
40
36
|
try {
|
|
41
|
-
const logPath = path.join(baseDir,
|
|
37
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
42
38
|
const logDir = path.dirname(logPath);
|
|
43
39
|
// Ensure telemetry directory exists
|
|
44
40
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
package/dist/mem-summarize.js
CHANGED
|
@@ -23,7 +23,7 @@ import fs from 'node:fs/promises';
|
|
|
23
23
|
import path from 'node:path';
|
|
24
24
|
import { summarizeWu } from '@lumenflow/memory/dist/mem-summarize-core.js';
|
|
25
25
|
import { createWUParser } from '@lumenflow/core/dist/arg-parser.js';
|
|
26
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
26
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
27
27
|
/**
|
|
28
28
|
* Log prefix for mem:summarize output
|
|
29
29
|
*/
|
|
@@ -32,10 +32,6 @@ const LOG_PREFIX = '[mem:summarize]';
|
|
|
32
32
|
* Tool name for audit logging
|
|
33
33
|
*/
|
|
34
34
|
const TOOL_NAME = 'mem:summarize';
|
|
35
|
-
/**
|
|
36
|
-
* Audit log file path
|
|
37
|
-
*/
|
|
38
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
39
35
|
/**
|
|
40
36
|
* CLI argument options specific to mem:summarize
|
|
41
37
|
*/
|
|
@@ -74,7 +70,7 @@ const CLI_OPTIONS = {
|
|
|
74
70
|
*/
|
|
75
71
|
async function writeAuditLog(baseDir, entry) {
|
|
76
72
|
try {
|
|
77
|
-
const logPath = path.join(baseDir,
|
|
73
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
78
74
|
const logDir = path.dirname(logPath);
|
|
79
75
|
// eslint-disable-next-line security/detect-non-literal-fs-filename -- CLI tool creates known directory
|
|
80
76
|
await fs.mkdir(logDir, { recursive: true });
|
package/dist/mem-triage.js
CHANGED
|
@@ -23,7 +23,7 @@ import fs from 'node:fs/promises';
|
|
|
23
23
|
import path from 'node:path';
|
|
24
24
|
import { listOpenDiscoveries, promoteDiscovery, archiveDiscovery, } from '@lumenflow/memory/dist/mem-triage-core.js';
|
|
25
25
|
import { createWUParser } from '@lumenflow/core/dist/arg-parser.js';
|
|
26
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
26
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
27
27
|
/**
|
|
28
28
|
* Log prefix for mem:triage output
|
|
29
29
|
*/
|
|
@@ -32,10 +32,6 @@ const LOG_PREFIX = '[mem:triage]';
|
|
|
32
32
|
* Tool name for audit logging
|
|
33
33
|
*/
|
|
34
34
|
const TOOL_NAME = 'mem:triage';
|
|
35
|
-
/**
|
|
36
|
-
* Audit log file path
|
|
37
|
-
*/
|
|
38
|
-
const AUDIT_LOG_PATH = '.beacon/telemetry/tools.ndjson';
|
|
39
35
|
/**
|
|
40
36
|
* CLI argument options specific to mem:triage
|
|
41
37
|
*/
|
|
@@ -109,7 +105,7 @@ const CLI_OPTIONS = {
|
|
|
109
105
|
*/
|
|
110
106
|
async function writeAuditLog(baseDir, entry) {
|
|
111
107
|
try {
|
|
112
|
-
const logPath = path.join(baseDir,
|
|
108
|
+
const logPath = path.join(baseDir, LUMENFLOW_PATHS.AUDIT_LOG);
|
|
113
109
|
const logDir = path.dirname(logPath);
|
|
114
110
|
await fs.mkdir(logDir, { recursive: true });
|
|
115
111
|
const line = `${JSON.stringify(entry)}\n`;
|
package/dist/metrics-snapshot.js
CHANGED
|
@@ -27,11 +27,11 @@ import { die } from '@lumenflow/core/dist/error-handler.js';
|
|
|
27
27
|
/** Log prefix for console output */
|
|
28
28
|
const LOG_PREFIX = '[metrics:snapshot]';
|
|
29
29
|
/** Default snapshot output path */
|
|
30
|
-
const DEFAULT_OUTPUT = '.
|
|
30
|
+
const DEFAULT_OUTPUT = '.lumenflow/snapshots/metrics-latest.json';
|
|
31
31
|
/** WU directory relative to repo root */
|
|
32
32
|
const WU_DIR = 'docs/04-operations/tasks/wu';
|
|
33
33
|
/** Skip-gates audit file path */
|
|
34
|
-
const SKIP_GATES_PATH = '.
|
|
34
|
+
const SKIP_GATES_PATH = '.lumenflow/skip-gates-audit.ndjson';
|
|
35
35
|
/** Snapshot type options */
|
|
36
36
|
const SNAPSHOT_TYPES = ['all', 'dora', 'lanes', 'flow'];
|
|
37
37
|
/**
|
|
@@ -11,16 +11,15 @@
|
|
|
11
11
|
import { Command } from 'commander';
|
|
12
12
|
import { existsSync, readdirSync } from 'node:fs';
|
|
13
13
|
import { loadInitiativeWUs, calculateProgress, formatProgress } from '@lumenflow/initiatives';
|
|
14
|
-
import { EXIT_CODES } from '@lumenflow/core/dist/wu-constants.js';
|
|
14
|
+
import { EXIT_CODES, LUMENFLOW_PATHS } from '@lumenflow/core/dist/wu-constants.js';
|
|
15
15
|
import chalk from 'chalk';
|
|
16
16
|
const LOG_PREFIX = '[orchestrate:init-status]';
|
|
17
|
-
const STAMPS_DIR = '.beacon/stamps';
|
|
18
17
|
function getCompletedWUs(wuIds) {
|
|
19
18
|
const completed = new Set();
|
|
20
|
-
if (!existsSync(STAMPS_DIR)) {
|
|
19
|
+
if (!existsSync(LUMENFLOW_PATHS.STAMPS_DIR)) {
|
|
21
20
|
return completed;
|
|
22
21
|
}
|
|
23
|
-
const files = readdirSync(STAMPS_DIR);
|
|
22
|
+
const files = readdirSync(LUMENFLOW_PATHS.STAMPS_DIR);
|
|
24
23
|
for (const wuId of wuIds) {
|
|
25
24
|
if (files.includes(`${wuId}.done`)) {
|
|
26
25
|
completed.add(wuId);
|
|
File without changes
|