@lumenflow/cli 5.0.3 → 5.2.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.
Files changed (80) hide show
  1. package/dist/capacity-snapshot-emitter.js +10 -12
  2. package/dist/capacity-snapshot-emitter.js.map +1 -1
  3. package/dist/commands/integrate.js +9 -0
  4. package/dist/commands/integrate.js.map +1 -1
  5. package/dist/delegation-role-resolver.js +1 -1
  6. package/dist/delegation-role-resolver.js.map +1 -1
  7. package/dist/docs-generate-pack-reference.js +57 -15
  8. package/dist/docs-generate-pack-reference.js.map +1 -1
  9. package/dist/docs-sync.js +7 -3
  10. package/dist/docs-sync.js.map +1 -1
  11. package/dist/init-docs-scaffolder.js +18 -3
  12. package/dist/init-docs-scaffolder.js.map +1 -1
  13. package/dist/init-templates.js +307 -0
  14. package/dist/init-templates.js.map +1 -1
  15. package/dist/init.js +26 -6
  16. package/dist/init.js.map +1 -1
  17. package/dist/kernel-event-sync/lifecycle-emitters.js +13 -14
  18. package/dist/kernel-event-sync/lifecycle-emitters.js.map +1 -1
  19. package/dist/kernel-event-sync/narrow-emissions.js +7 -4
  20. package/dist/kernel-event-sync/narrow-emissions.js.map +1 -1
  21. package/dist/kernel-event-sync/software-delivery-emitters.js +91 -0
  22. package/dist/kernel-event-sync/software-delivery-emitters.js.map +1 -1
  23. package/dist/lumenflow-upgrade.js +86 -23
  24. package/dist/lumenflow-upgrade.js.map +1 -1
  25. package/dist/orchestrate-init-status.js +24 -11
  26. package/dist/orchestrate-init-status.js.map +1 -1
  27. package/dist/pack-install.js +27 -20
  28. package/dist/pack-install.js.map +1 -1
  29. package/dist/pack-publish.js +34 -26
  30. package/dist/pack-publish.js.map +1 -1
  31. package/dist/release.js +293 -146
  32. package/dist/release.js.map +1 -1
  33. package/dist/skills-projection.js +84 -0
  34. package/dist/skills-projection.js.map +1 -0
  35. package/dist/sync-templates.js +4 -4
  36. package/dist/sync-templates.js.map +1 -1
  37. package/dist/temp-dir-cleanup.js +112 -0
  38. package/dist/temp-dir-cleanup.js.map +1 -0
  39. package/dist/validate-agent-skills.js +4 -4
  40. package/dist/validate-agent-skills.js.map +1 -1
  41. package/dist/validate-agent-sync.js +109 -45
  42. package/dist/validate-agent-sync.js.map +1 -1
  43. package/dist/validate-skills-spec.js +2 -2
  44. package/dist/wu-done.js +1 -1
  45. package/dist/wu-done.js.map +1 -1
  46. package/dist/wu-spawn-prompt-builders.js +11 -34
  47. package/dist/wu-spawn-prompt-builders.js.map +1 -1
  48. package/dist/wu-spawn-strategy-resolver.js +4 -0
  49. package/dist/wu-spawn-strategy-resolver.js.map +1 -1
  50. package/package.json +11 -11
  51. package/packs/agent-runtime/manifest.ts +55 -4
  52. package/packs/agent-runtime/manifest.yaml +16 -6
  53. package/packs/agent-runtime/orchestration.ts +26 -1
  54. package/packs/agent-runtime/package.json +1 -1
  55. package/packs/agent-runtime/remote-controls/operations.ts +6 -0
  56. package/packs/agent-runtime/tool-impl/remote-controls.mock.ts +4 -0
  57. package/packs/agent-runtime/turn-lifecycle-events.ts +90 -1
  58. package/packs/sidekick/manifest.yaml +6 -0
  59. package/packs/sidekick/package.json +2 -1
  60. package/packs/sidekick/sidekick-events.ts +195 -18
  61. package/packs/sidekick/src/adapters/control-plane-bridge.adapter.ts +18 -10
  62. package/packs/sidekick/src/adapters/filesystem-bridge.adapter.ts +4 -0
  63. package/packs/sidekick/src/domain/channel.types.ts +34 -54
  64. package/packs/sidekick/src/ports/channel-bridge.port.ts +29 -12
  65. package/packs/sidekick/tool-impl/channel-tools.ts +47 -16
  66. package/packs/sidekick/tool-impl/system-tools.ts +4 -6
  67. package/packs/software-delivery/manifest.ts +94 -7
  68. package/packs/software-delivery/manifest.yaml +42 -5
  69. package/packs/software-delivery/package.json +1 -1
  70. package/packs/software-delivery/src/config/schemas/lumenflow-config-schema-types.ts +26 -2
  71. package/packs/software-delivery/src/config/workspace-reader.ts +67 -2
  72. package/packs/software-delivery/src/constants/wu-paths-constants.ts +26 -0
  73. package/packs/software-delivery/src/domain/orchestration.constants.ts +7 -9
  74. package/packs/software-delivery/src/domain/orchestration.schemas.ts +1 -2
  75. package/packs/software-delivery/src/domain/orchestration.types.ts +0 -2
  76. package/packs/software-delivery/src/state/wu-paths.ts +1 -1
  77. package/packs/software-delivery/tool-impl/wu-lifecycle-tools.ts +30 -0
  78. package/templates/core/AGENTS.md.template +12 -8
  79. package/templates/core/LUMENFLOW.md.template +14 -9
  80. package/templates/core/ai/onboarding/agent-invocation-guide.md.template +5 -0
@@ -47,8 +47,12 @@ export type Lane = (typeof LANES)[number];
47
47
  * Known agent names in the orchestration system.
48
48
  * Includes both mandatory (Tier 1) and suggested (Tier 2) agents.
49
49
  *
50
- * Note: These are LumenFlow framework agents defined in .claude/agents/.
51
- * Application-specific agents should be configured separately.
50
+ * Note: These are the framework's vendor-neutral default aliases. Vendor
51
+ * overlays may materialize them in different native surfaces, and
52
+ * application-specific agents should still be configured separately.
53
+ *
54
+ * v2 roster refresh: the default set removes `lumenflow-doc-sync` and adds
55
+ * `initiative-architect`.
52
56
  */
53
57
  export const AGENT_NAMES = [
54
58
  'general-purpose',
@@ -57,12 +61,9 @@ export const AGENT_NAMES = [
57
61
  'code-reviewer',
58
62
  'bug-triage',
59
63
  'lumenflow-enforcer',
60
- 'lumenflow-doc-sync',
64
+ 'initiative-architect',
61
65
  ] as const;
62
66
 
63
- /** Type for agent names */
64
- export type AgentName = (typeof AGENT_NAMES)[number];
65
-
66
67
  /**
67
68
  * Alert severity levels for dashboard display.
68
69
  * HIGH = action required immediately
@@ -127,9 +128,6 @@ export type UserChoiceOption = (typeof USER_CHOICE_OPTIONS)[number];
127
128
  */
128
129
  export const MANDATORY_AGENT_NAMES = [] as const;
129
130
 
130
- /** Type for mandatory agent names */
131
- export type MandatoryAgentName = (typeof MANDATORY_AGENT_NAMES)[number];
132
-
133
131
  /**
134
132
  * Mandatory agent triggers - glob patterns that indicate when agents must be invoked.
135
133
  * Uses minimatch patterns (NOT regex) for file path matching.
@@ -15,7 +15,6 @@
15
15
  import { z } from 'zod';
16
16
  import {
17
17
  LANES,
18
- AGENT_NAMES,
19
18
  SEVERITY_LEVELS,
20
19
  AGENT_RESULT_STATUSES,
21
20
  TIMELINE_EVENT_TYPES,
@@ -38,7 +37,7 @@ const LongestRunningSchema = z.object({
38
37
  */
39
38
  const PendingMandatorySchema = z.object({
40
39
  wuId: z.string().min(1),
41
- agent: z.enum(AGENT_NAMES),
40
+ agent: z.string().min(1),
42
41
  });
43
42
 
44
43
  /**
@@ -28,13 +28,11 @@ import type {
28
28
  // Re-export constant-derived types for convenience
29
29
  export type {
30
30
  Lane,
31
- AgentName,
32
31
  SeverityLevel,
33
32
  AgentResultStatus,
34
33
  TimelineEventType,
35
34
  EventSeverityLevel,
36
35
  UserChoiceOption,
37
- MandatoryAgentName,
38
36
  } from './orchestration.constants.js';
39
37
 
40
38
  // Re-export const values as well
@@ -67,7 +67,7 @@ const FALLBACK_DIRECTORIES: WorkspaceDirectories = {
67
67
  initiativesDir: 'docs/operations/tasks/initiatives',
68
68
  backlogPath: 'docs/operations/tasks/backlog.md',
69
69
  statusPath: 'docs/operations/tasks/status.md',
70
- skillsDir: '.claude/skills',
70
+ skillsDir: '.lumenflow/skills',
71
71
  agentsDir: '.claude/agents',
72
72
  adrDir: 'docs/adr',
73
73
  plansDir: 'docs/operations/plans',
@@ -698,6 +698,36 @@ export async function wuRepairTool(input: unknown): Promise<ToolOutput> {
698
698
  return executeLifecycleTool(LIFECYCLE_TOOLS.WU_REPAIR, args);
699
699
  }
700
700
 
701
+ /**
702
+ * WU-2833 (INIT-062 WU-G): privileged wu:repair variant registered as a
703
+ * distinct pack tool (wu:repair:admin) so cloud-team phone UX can expose
704
+ * admin recovery behind a remote_mutation approval gate without widening
705
+ * the default wu:repair surface. Forces `--admin` on every invocation.
706
+ */
707
+ export async function wuRepairAdminTool(input: unknown): Promise<ToolOutput> {
708
+ const parsed = toRecord(input);
709
+
710
+ const args: string[] = ['--admin'];
711
+ const id = toStringValue(parsed.id);
712
+ if (id) {
713
+ args.push('--id', id);
714
+ }
715
+ if (parsed.check === true) {
716
+ args.push('--check');
717
+ }
718
+ if (parsed.all === true) {
719
+ args.push('--all');
720
+ }
721
+ if (parsed.claim === true) {
722
+ args.push('--claim');
723
+ }
724
+ if (parsed.repair_state === true) {
725
+ args.push('--repair-state');
726
+ }
727
+
728
+ return executeLifecycleTool(LIFECYCLE_TOOLS.WU_REPAIR, args);
729
+ }
730
+
701
731
  export async function wuStatusTool(input: unknown): Promise<ToolOutput> {
702
732
  const parsed = toRecord(input);
703
733
  const id = toStringValue(parsed.id);
@@ -204,14 +204,18 @@ LumenFlow enforces safety at the repository level via git wrappers and hooks. Fo
204
204
 
205
205
  This file provides universal guidance for all AI agents. LumenFlow skills live in `.lumenflow/skills/` as `SKILL.md` files and are projected to each vendor via `pnpm lumenflow:integrate --client <x>`.
206
206
 
207
- | Vendor | Skill / rules surface | Invocation |
208
- | ------------ | --------------------------------------- | -------------------------------------------------------- |
209
- | Claude Code | `.claude/skills/` + `.claude/CLAUDE.md` | `Skill` tool call, or `/skill <name>` in interactive CLI |
210
- | OpenAI Codex | `.codex/skills/` or repo `skills/` | `/skills`, `$<name>` mention, or implicit |
211
- | Cursor | `.cursor/rules/` + agent skills | `/skills` or auto-discovery |
212
- | Windsurf | `.windsurf/rules/` + Cascade skills | Auto-discovery; workflows via `/<workflow-name>` |
213
- | Aider | `CONVENTIONS.md` | `/read CONVENTIONS.md` or `aider --read CONVENTIONS.md` |
214
- | Cline | `.clinerules` | Auto-loaded |
207
+ | Vendor | Skill / rules surface | Invocation |
208
+ | ------------ | --------------------------------------------------- | ---------------------------------------------------------------------- |
209
+ | Claude Code | `.claude/skills/` + `.claude/CLAUDE.md` | `Skill` tool call, or `/skill <name>` in interactive CLI |
210
+ | OpenAI Codex | `AGENTS.md` + `.agents/skills/` + `.codex/agents/` | `/skills`, `$<name>` mention, implicit skills, explicit subagent usage |
211
+ | Cursor | `.cursor/rules/` + `.agents/skills/` | `/skills` or auto-discovery |
212
+ | Windsurf | `.windsurf/rules/` + `.agents/skills/` | Auto-discovery; workflows via `/<workflow-name>` |
213
+ | Aider | `CONVENTIONS.md` | `/read CONVENTIONS.md` or `aider --read CONVENTIONS.md` |
214
+ | Cline | `.clinerules` | Auto-loaded |
215
+
216
+ Shared cross-vendor surfaces: `AGENTS.md` and `.agents/skills/`.
217
+ Vendor-specific overlays: `.claude/agents/`, `.codex/agents/`, `.cursor/rules/`, and `.windsurf/rules/`.
218
+ For Codex specifically, `.codex/agents/*.toml` are explicit-only subagent overlays; Codex will not auto-match them by description.
215
219
 
216
220
  A skill named in prose does nothing — load it through the vendor's invocation before the work it covers. See [LUMENFLOW.md "Skills & Agents"](LUMENFLOW.md#skills--agents) for the canonical skill list.
217
221
 
@@ -761,15 +761,20 @@ For vendor-specific setup details and per-vendor quirks, see:
761
761
 
762
762
  ### Agents
763
763
 
764
- Pre-configured agent definitions in `.claude/agents/`:
764
+ Recommended framework roster (vendor-neutral aliases):
765
765
 
766
- | Agent | Purpose |
767
- | ----------------- | -------------------------- |
768
- | `general-purpose` | Standard WU implementation |
769
- | `lumenflow-pm` | Backlog & lifecycle |
770
- | `test-engineer` | TDD, coverage |
771
- | `code-reviewer` | Quality checks |
772
- | `bug-triage` | Bug classification |
766
+ | Agent | Purpose |
767
+ | ---------------------- | ------------------------------------- |
768
+ | `general-purpose` | Standard WU implementation |
769
+ | `lumenflow-pm` | Backlog & lifecycle |
770
+ | `test-engineer` | TDD, coverage |
771
+ | `code-reviewer` | Quality checks |
772
+ | `bug-triage` | Bug classification |
773
+ | `lumenflow-enforcer` | Workflow compliance and gates |
774
+ | `initiative-architect` | Initiative planning and decomposition |
775
+
776
+ Client-specific overlays may implement these aliases in different native surfaces such as
777
+ `.claude/agents/`, `.codex/agents/`, or vendor rule/config directories.
773
778
 
774
779
  Generate handoff prompts (prompt-only, execution is a separate step): `pnpm wu:brief --id WU-XXX --client <client>`
775
780
  Record explicit delegation lineage when needed: `pnpm wu:delegate --id WU-XXX --parent-wu WU-YYY --client <client>`
@@ -797,5 +802,5 @@ Durable artifacts carry `requested_role` (from the orchestrator) and `actual_rol
797
802
  - [.lumenflow/constraints.md](.lumenflow/constraints.md) -- Non-negotiable rules and forbidden commands
798
803
  - [WU Sizing Guide]({{DOCS_OPERATIONS_PATH}}/_frameworks/lumenflow/wu-sizing-guide.md) -- Scoping work without needless fragmentation
799
804
  - [ADR-014: Typed Agent-Role Contract](docs/09-architecture-decisions/ADR-014-typed-agent-role-contract.md) — Canonical orchestration role vocabulary
800
- - [Skills Index](.claude/skills/INDEX.md)
805
+ - [Skills Index](.lumenflow/skills/INDEX.md)
801
806
  - [Agents README](.claude/agents/README.md)
@@ -146,6 +146,10 @@ These surfaces already assemble the objective, scope, code paths, tests, recover
146
146
  constraints block, and evidence metadata. Do not prepend or append a second wrapper block around
147
147
  them.
148
148
 
149
+ The role aliases referenced by these handoffs are vendor-neutral framework names (`general-purpose`,
150
+ `lumenflow-pm`, `initiative-architect`, and so on). Client-specific overlays may implement those
151
+ aliases differently, but the orchestration brief should keep the shared alias vocabulary intact.
152
+
149
153
  If you are building a fully custom or experimental prompt outside those canonical surfaces, use
150
154
  this structure:
151
155
 
@@ -214,6 +218,7 @@ Before spawning:
214
218
 
215
219
  - Confirm WU status and lane availability
216
220
  - Ensure worktree exists (or claim first)
221
+ - Use the shared framework alias vocabulary in the brief, not vendor-specific display names
217
222
  - Provide explicit code_paths and tests
218
223
  - Require `mem:checkpoint` at 50+ tool calls
219
224
  - Require `mem:signal` for milestones