@lumenflow/cli 5.0.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/integrate.js +9 -0
- package/dist/commands/integrate.js.map +1 -1
- package/dist/delegation-role-resolver.js +1 -1
- package/dist/delegation-role-resolver.js.map +1 -1
- package/dist/docs-generate-pack-reference.js +3 -15
- package/dist/docs-generate-pack-reference.js.map +1 -1
- package/dist/docs-sync.js +7 -3
- package/dist/docs-sync.js.map +1 -1
- package/dist/init-docs-scaffolder.js +18 -3
- package/dist/init-docs-scaffolder.js.map +1 -1
- package/dist/init-templates.js +399 -50
- package/dist/init-templates.js.map +1 -1
- package/dist/init.js +26 -6
- package/dist/init.js.map +1 -1
- package/dist/lumenflow-upgrade.js +286 -38
- package/dist/lumenflow-upgrade.js.map +1 -1
- package/dist/release.js +210 -2
- package/dist/release.js.map +1 -1
- package/dist/signal-middleware.js +23 -0
- package/dist/signal-middleware.js.map +1 -1
- package/dist/skills-projection.js +84 -0
- package/dist/skills-projection.js.map +1 -0
- package/dist/sync-templates.js +4 -4
- package/dist/sync-templates.js.map +1 -1
- package/dist/validate-agent-skills.js +4 -4
- package/dist/validate-agent-skills.js.map +1 -1
- package/dist/validate-agent-sync.js +108 -45
- package/dist/validate-agent-sync.js.map +1 -1
- package/dist/validate-skills-spec.js +2 -2
- package/dist/wu-done.js +1 -1
- package/dist/wu-done.js.map +1 -1
- package/dist/wu-spawn-prompt-builders.js +11 -34
- package/dist/wu-spawn-prompt-builders.js.map +1 -1
- package/package.json +11 -11
- package/packs/agent-runtime/package.json +1 -1
- package/packs/sidekick/package.json +1 -1
- package/packs/software-delivery/package.json +1 -1
- package/packs/software-delivery/src/config/schemas/lumenflow-config-schema-types.ts +26 -2
- package/packs/software-delivery/src/config/workspace-reader.ts +67 -2
- package/packs/software-delivery/src/constants/wu-paths-constants.ts +26 -0
- package/packs/software-delivery/src/domain/orchestration.constants.ts +7 -9
- package/packs/software-delivery/src/domain/orchestration.schemas.ts +1 -2
- package/packs/software-delivery/src/domain/orchestration.types.ts +0 -2
- package/packs/software-delivery/src/state/wu-paths.ts +1 -1
- package/templates/core/AGENTS.md.template +12 -8
- package/templates/core/LUMENFLOW.md.template +14 -9
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +5 -0
package/dist/init-templates.js
CHANGED
|
@@ -1358,71 +1358,113 @@ pnpm lint:fix # Fix lint issues
|
|
|
1358
1358
|
pnpm typecheck # Check types
|
|
1359
1359
|
\`\`\`
|
|
1360
1360
|
`;
|
|
1361
|
+
export const LUMENFLOW_RUNTIME_WRITE_PATHS = [
|
|
1362
|
+
// --- Runtime directories (full trees) ---
|
|
1363
|
+
{ kind: 'directory', path: '.lumenflow/telemetry/', reason: 'flow/prompt/audit telemetry' },
|
|
1364
|
+
{ kind: 'directory', path: '.lumenflow/sessions/', reason: 'agent session state' },
|
|
1365
|
+
{ kind: 'directory', path: '.lumenflow/memory/', reason: 'memory layer store' },
|
|
1366
|
+
{ kind: 'directory', path: '.lumenflow/checkpoints/', reason: 'context recovery checkpoints' },
|
|
1367
|
+
{ kind: 'directory', path: '.lumenflow/locks/', reason: 'lane + merge locks' },
|
|
1368
|
+
{ kind: 'directory', path: '.lumenflow/artifacts/', reason: 'wu:brief/delegate artifacts' },
|
|
1369
|
+
// --- Individual log / audit files under .lumenflow/ ---
|
|
1370
|
+
{ kind: 'file', path: '.lumenflow/flow.log', reason: 'WU flow event log' },
|
|
1371
|
+
{ kind: 'file', path: '.lumenflow/commands.log', reason: 'git command audit log' },
|
|
1372
|
+
{ kind: 'file', path: '.lumenflow/skip-gates-audit.log', reason: 'skip-gates audit' },
|
|
1373
|
+
{ kind: 'file', path: '.lumenflow/skip-gates-audit.ndjson', reason: 'skip-gates audit (ndjson)' },
|
|
1374
|
+
{ kind: 'file', path: '.lumenflow/skip-cos-gates-audit.log', reason: 'skip-cos-gates audit' },
|
|
1375
|
+
{
|
|
1376
|
+
kind: 'file',
|
|
1377
|
+
path: '.lumenflow/ownership-override-audit.log',
|
|
1378
|
+
reason: 'ownership override audit',
|
|
1379
|
+
},
|
|
1380
|
+
{ kind: 'file', path: '.lumenflow/force-bypasses.log', reason: 'force-bypass audit' },
|
|
1381
|
+
// --- Pattern-level exclusions under .lumenflow/state/ (WU-2837) ---
|
|
1382
|
+
//
|
|
1383
|
+
// The kernel writes a growing set of files directly under `.lumenflow/state/`
|
|
1384
|
+
// at runtime: sidecar pidfile, spawn registry, display-name reservations,
|
|
1385
|
+
// enforcement-prior snapshot, phone-device registry, claim queue, etc.
|
|
1386
|
+
// Cover them with glob patterns so the next write-path does not re-ship drift.
|
|
1387
|
+
// The one tracked file (`wu-events.jsonl`) is re-included via the `negate`
|
|
1388
|
+
// entry below.
|
|
1389
|
+
{ kind: 'file', path: '.lumenflow/state/*.pid', reason: 'sidecar pidfiles (ADR-011 §4)' },
|
|
1390
|
+
{
|
|
1391
|
+
kind: 'file',
|
|
1392
|
+
path: '.lumenflow/state/*.jsonl',
|
|
1393
|
+
reason: 'runtime append-only logs (claim-queue, spawn-registry, delegation-registry, ...)',
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
kind: 'file',
|
|
1397
|
+
path: '.lumenflow/state/*.json',
|
|
1398
|
+
reason: 'runtime snapshots (enforcement-prior, phone-devices, ...)',
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
kind: 'negate',
|
|
1402
|
+
path: '.lumenflow/state/wu-events.jsonl',
|
|
1403
|
+
reason: 'lifecycle evidence — MUST stay tracked (wu:done consumes it)',
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
kind: 'directory',
|
|
1407
|
+
path: '.lumenflow/state/conductor/',
|
|
1408
|
+
reason: 'conductor outbox replay queue (ADR-013 §4)',
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
kind: 'directory',
|
|
1412
|
+
path: '.lumenflow/state/hook-counters/',
|
|
1413
|
+
reason: 'auto-checkpoint interval counters (WU-1471)',
|
|
1414
|
+
},
|
|
1415
|
+
// --- Other top-level runtime writes ---
|
|
1416
|
+
{ kind: 'file', path: '.logs/', reason: 'gates output logs (WU-1852)' },
|
|
1417
|
+
];
|
|
1418
|
+
/**
|
|
1419
|
+
* Helper: render a {@link LumenflowRuntimeWritePath} as a gitignore line.
|
|
1420
|
+
* `negate` entries render with a leading `!` so they re-include.
|
|
1421
|
+
*/
|
|
1422
|
+
function runtimeWritePathToGitignoreLine(entry) {
|
|
1423
|
+
return entry.kind === 'negate' ? `!${entry.path}` : entry.path;
|
|
1424
|
+
}
|
|
1361
1425
|
/**
|
|
1362
1426
|
* WU-1969: Shared exclusion list used by both the full GITIGNORE_TEMPLATE
|
|
1363
1427
|
* (fresh init) and the merge path (existing .gitignore).
|
|
1364
1428
|
*
|
|
1365
|
-
*
|
|
1429
|
+
* WU-2837: Derived from {@link LUMENFLOW_RUNTIME_WRITE_PATHS} (single source
|
|
1430
|
+
* of truth for runtime write-paths) plus the two non-`.lumenflow/` entries
|
|
1431
|
+
* (`node_modules`, worktrees).
|
|
1432
|
+
*
|
|
1366
1433
|
* Each entry has a `pattern` (substring to search for in existing content)
|
|
1367
1434
|
* and a `line` (exact line to append when missing).
|
|
1368
1435
|
*/
|
|
1369
1436
|
export const REQUIRED_GITIGNORE_EXCLUSIONS = [
|
|
1370
1437
|
{ pattern: 'node_modules', line: 'node_modules/' },
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
pattern
|
|
1379
|
-
|
|
1380
|
-
},
|
|
1381
|
-
{ pattern: '.lumenflow/force-bypasses.log', line: '.lumenflow/force-bypasses.log' },
|
|
1382
|
-
{ pattern: '.lumenflow/sessions/', line: '.lumenflow/sessions/' },
|
|
1383
|
-
{ pattern: '.lumenflow/memory/', line: '.lumenflow/memory/' },
|
|
1384
|
-
// WU-2180: Ephemeral paths that were missing, causing wu:done clean-tree failures
|
|
1385
|
-
{ pattern: '.lumenflow/checkpoints/', line: '.lumenflow/checkpoints/' },
|
|
1386
|
-
{ pattern: '.lumenflow/locks/', line: '.lumenflow/locks/' },
|
|
1387
|
-
{ pattern: '.lumenflow/artifacts/', line: '.lumenflow/artifacts/' },
|
|
1388
|
-
{
|
|
1389
|
-
pattern: '.lumenflow/state/spawn-registry.jsonl',
|
|
1390
|
-
line: '.lumenflow/state/spawn-registry.jsonl',
|
|
1391
|
-
},
|
|
1392
|
-
{
|
|
1393
|
-
pattern: '.lumenflow/state/conductor/outbox/',
|
|
1394
|
-
line: '.lumenflow/state/conductor/outbox/',
|
|
1395
|
-
},
|
|
1396
|
-
{
|
|
1397
|
-
pattern: '.lumenflow/state/display-name-reservations.jsonl',
|
|
1398
|
-
line: '.lumenflow/state/display-name-reservations.jsonl',
|
|
1399
|
-
},
|
|
1400
|
-
{ pattern: '.logs/', line: '.logs/' },
|
|
1438
|
+
...LUMENFLOW_RUNTIME_WRITE_PATHS.map((entry) => {
|
|
1439
|
+
const line = runtimeWritePathToGitignoreLine(entry);
|
|
1440
|
+
// Search pattern: strip trailing `/` so a consumer gitignore matches whether
|
|
1441
|
+
// they wrote `.lumenflow/telemetry` or `.lumenflow/telemetry/` (WU-1969
|
|
1442
|
+
// compatibility). For `negate` entries the full `!path` line must be
|
|
1443
|
+
// present verbatim, so keep the `!` prefix but still strip trailing `/`.
|
|
1444
|
+
const pattern = line.endsWith('/') ? line.slice(0, -1) : line;
|
|
1445
|
+
return { pattern, line };
|
|
1446
|
+
}),
|
|
1401
1447
|
{ pattern: DEFAULT_WORKTREES_PATTERN, line: DEFAULT_WORKTREES_DIR },
|
|
1402
1448
|
];
|
|
1449
|
+
/**
|
|
1450
|
+
* WU-2837: Render the runtime-state block of GITIGNORE_TEMPLATE from
|
|
1451
|
+
* {@link LUMENFLOW_RUNTIME_WRITE_PATHS} so the fresh-init and merge paths
|
|
1452
|
+
* cannot drift. Directories/files come first, then `negate` re-includes.
|
|
1453
|
+
*/
|
|
1454
|
+
function renderRuntimeStateGitignoreBlock() {
|
|
1455
|
+
const positive = LUMENFLOW_RUNTIME_WRITE_PATHS.filter((e) => e.kind !== 'negate').map(runtimeWritePathToGitignoreLine);
|
|
1456
|
+
const negate = LUMENFLOW_RUNTIME_WRITE_PATHS.filter((e) => e.kind === 'negate').map(runtimeWritePathToGitignoreLine);
|
|
1457
|
+
return [...positive, ...negate].join('\n');
|
|
1458
|
+
}
|
|
1403
1459
|
export const GITIGNORE_TEMPLATE = `# Dependencies
|
|
1404
1460
|
node_modules/
|
|
1405
1461
|
|
|
1406
1462
|
# LumenFlow runtime state (local only, not shared)
|
|
1407
|
-
.lumenflow/
|
|
1408
|
-
.
|
|
1409
|
-
|
|
1410
|
-
.
|
|
1411
|
-
|
|
1412
|
-
.lumenflow/skip-cos-gates-audit.log
|
|
1413
|
-
.lumenflow/ownership-override-audit.log
|
|
1414
|
-
.lumenflow/force-bypasses.log
|
|
1415
|
-
.lumenflow/sessions/
|
|
1416
|
-
.lumenflow/memory/
|
|
1417
|
-
.lumenflow/checkpoints/
|
|
1418
|
-
.lumenflow/locks/
|
|
1419
|
-
.lumenflow/artifacts/
|
|
1420
|
-
.lumenflow/state/spawn-registry.jsonl
|
|
1421
|
-
.lumenflow/state/conductor/outbox/
|
|
1422
|
-
.lumenflow/state/display-name-reservations.jsonl
|
|
1423
|
-
|
|
1424
|
-
# WU-1852: Gates output logs (generated by wu:done/wu:prep)
|
|
1425
|
-
.logs/
|
|
1463
|
+
# Pattern-level exclusions under .lumenflow/state/ cover sidecar pidfiles,
|
|
1464
|
+
# spawn registries, display-name reservations, and other kernel runtime writes.
|
|
1465
|
+
# See LUMENFLOW_RUNTIME_WRITE_PATHS in @lumenflow/cli init-templates for the
|
|
1466
|
+
# canonical source of truth.
|
|
1467
|
+
${renderRuntimeStateGitignoreBlock()}
|
|
1426
1468
|
|
|
1427
1469
|
# Worktrees (isolated parallel work directories)
|
|
1428
1470
|
${DEFAULT_WORKTREES_DIR}
|
|
@@ -1562,6 +1604,313 @@ esac
|
|
|
1562
1604
|
# Allow commits on lane branches and other branches
|
|
1563
1605
|
exit 0
|
|
1564
1606
|
`;
|
|
1607
|
+
export const CODEX_AGENT_TEMPLATES = {
|
|
1608
|
+
'README.md': `# LumenFlow Codex Agents
|
|
1609
|
+
|
|
1610
|
+
This directory contains Codex subagent overlays for LumenFlow orchestration.
|
|
1611
|
+
|
|
1612
|
+
## Design Principle
|
|
1613
|
+
|
|
1614
|
+
**Agents = Orchestration, Skills = Validation**
|
|
1615
|
+
|
|
1616
|
+
- **Agents** coordinate work, reviews, planning, and enforcement
|
|
1617
|
+
- **Skills** provide domain expertise and reusable validation checklists
|
|
1618
|
+
|
|
1619
|
+
## Surface Model
|
|
1620
|
+
|
|
1621
|
+
- \`AGENTS.md\` and \`.agents/skills/\` are shared cross-vendor surfaces
|
|
1622
|
+
- \`.codex/agents/*.toml\` is the Codex-specific subagent overlay
|
|
1623
|
+
- Codex subagent delegation is **explicit-only**
|
|
1624
|
+
- Codex will not auto-match these subagents by description
|
|
1625
|
+
|
|
1626
|
+
## Agent Inventory
|
|
1627
|
+
|
|
1628
|
+
| Agent | Effort | Sandbox | Purpose | Explicitly delegate when... |
|
|
1629
|
+
| ---------------------- | ------ | ----------------- | ------------------------------------- | --------------------------------------------------------- |
|
|
1630
|
+
| \`general-purpose\` | medium | \`workspace-write\` | Standard WU implementation | No specialist agent is a better fit |
|
|
1631
|
+
| \`lumenflow-enforcer\` | low | \`read-only\` | WU validation, gates enforcement | Verifying completion readiness before \`wu:done\` |
|
|
1632
|
+
| \`lumenflow-pm\` | xhigh | \`workspace-write\` | WU lifecycle, state repairs | Claim/block/done work or initiative coordination |
|
|
1633
|
+
| \`test-engineer\` | medium | \`workspace-write\` | TDD, coverage gaps | Writing failing tests first or closing coverage gaps |
|
|
1634
|
+
| \`code-reviewer\` | xhigh | \`read-only\` | PR review, quality | Auditing regression risk or architecture quality |
|
|
1635
|
+
| \`bug-triage\` | low | \`read-only\` | Bug classification (P0-P3) | Classifying a defect discovered mid-WU |
|
|
1636
|
+
| \`initiative-architect\` | xhigh | \`read-only\` | Initiative planning and decomposition | Breaking initiative goals into phases and dependency flow |
|
|
1637
|
+
|
|
1638
|
+
## Using Codex Subagents
|
|
1639
|
+
|
|
1640
|
+
1. Generate the shared WU context with \`pnpm wu:brief --id WU-XXX --client codex-cli\`
|
|
1641
|
+
2. Ask Codex explicitly to delegate to the named subagent from this directory
|
|
1642
|
+
3. Treat the subagent as an overlay on top of \`AGENTS.md\` and \`.agents/skills/\`
|
|
1643
|
+
|
|
1644
|
+
Example phrasing:
|
|
1645
|
+
|
|
1646
|
+
\`\`\`text
|
|
1647
|
+
Use the Codex subagent \`code-reviewer\` from \`.codex/agents/code-reviewer.toml\` to review this WU before prep.
|
|
1648
|
+
\`\`\`
|
|
1649
|
+
|
|
1650
|
+
## TOML Structure
|
|
1651
|
+
|
|
1652
|
+
\`\`\`toml
|
|
1653
|
+
name = "agent-name"
|
|
1654
|
+
description = "When to use this agent"
|
|
1655
|
+
model_reasoning_effort = "medium"
|
|
1656
|
+
sandbox_mode = "workspace-write"
|
|
1657
|
+
|
|
1658
|
+
developer_instructions = """
|
|
1659
|
+
Agent-specific instructions here...
|
|
1660
|
+
"""
|
|
1661
|
+
|
|
1662
|
+
[[skills.config]]
|
|
1663
|
+
path = ".agents/skills/design-first"
|
|
1664
|
+
enabled = true
|
|
1665
|
+
\`\`\`
|
|
1666
|
+
|
|
1667
|
+
## Constraints Capsule
|
|
1668
|
+
|
|
1669
|
+
All Codex agents must follow:
|
|
1670
|
+
|
|
1671
|
+
1. \`AGENTS.md\`
|
|
1672
|
+
2. \`LUMENFLOW.md\`
|
|
1673
|
+
3. \`.lumenflow/constraints.md\`
|
|
1674
|
+
4. The claimed WU YAML
|
|
1675
|
+
|
|
1676
|
+
## Related
|
|
1677
|
+
|
|
1678
|
+
- \`AGENTS.md\` — Shared cross-vendor instructions
|
|
1679
|
+
- \`.agents/skills/\` — Shared skill discovery path
|
|
1680
|
+
- \`.claude/agents/\` — Claude overlay with matching role semantics
|
|
1681
|
+
- \`workspace.yaml\` — Agent configuration
|
|
1682
|
+
`,
|
|
1683
|
+
'bug-triage.toml': `name = "bug-triage"
|
|
1684
|
+
description = "MUST BE USED when bugs are discovered mid-WU. Classifies severity (P0-P3) and determines fix-in-place vs Bug WU creation."
|
|
1685
|
+
model_reasoning_effort = "low"
|
|
1686
|
+
sandbox_mode = "read-only"
|
|
1687
|
+
|
|
1688
|
+
developer_instructions = """
|
|
1689
|
+
You are the Bug Triage Agent, responsible for classifying defects and deciding whether they belong in the current WU or a separate bug WU.
|
|
1690
|
+
|
|
1691
|
+
Before starting:
|
|
1692
|
+
1. Read AGENTS.md, LUMENFLOW.md, .lumenflow/constraints.md, and the active WU YAML.
|
|
1693
|
+
2. Stay read-only while gathering evidence unless explicitly asked to help with the fix.
|
|
1694
|
+
3. Remember Codex subagent delegation is explicit-only; focus on classification and response guidance.
|
|
1695
|
+
|
|
1696
|
+
Primary responsibilities:
|
|
1697
|
+
- Classify severity from P0 to P3
|
|
1698
|
+
- Decide fix-in-place versus separate bug WU
|
|
1699
|
+
- Surface escalation requirements for P0/P1 cases
|
|
1700
|
+
- Leave clear guidance another agent can execute immediately
|
|
1701
|
+
|
|
1702
|
+
Completion standard:
|
|
1703
|
+
- Include severity, rationale, and recommended next action
|
|
1704
|
+
- Prefer explicit bug WUs over silent scope creep
|
|
1705
|
+
"""
|
|
1706
|
+
|
|
1707
|
+
[[skills.config]]
|
|
1708
|
+
path = ".agents/skills/bug-classification"
|
|
1709
|
+
enabled = true
|
|
1710
|
+
|
|
1711
|
+
[[skills.config]]
|
|
1712
|
+
path = ".agents/skills/wu-lifecycle"
|
|
1713
|
+
enabled = true
|
|
1714
|
+
`,
|
|
1715
|
+
'code-reviewer.toml': `name = "code-reviewer"
|
|
1716
|
+
description = "Review changes before wu:done, during PR review, or whenever work crosses package or architecture boundaries. Proactively checks regression risk, code quality, architectural compliance, and SOLID/DRY discipline."
|
|
1717
|
+
model_reasoning_effort = "xhigh"
|
|
1718
|
+
sandbox_mode = "read-only"
|
|
1719
|
+
|
|
1720
|
+
developer_instructions = """
|
|
1721
|
+
You are the Code Reviewer, responsible for regression analysis, code quality, and architectural compliance.
|
|
1722
|
+
|
|
1723
|
+
Before starting:
|
|
1724
|
+
1. Read AGENTS.md, LUMENFLOW.md, .lumenflow/constraints.md, and the active WU YAML.
|
|
1725
|
+
2. Stay read-only unless the parent task explicitly asks for edits.
|
|
1726
|
+
3. Remember Codex subagent delegation is explicit-only; use that focus to deliver a clean findings-first review.
|
|
1727
|
+
|
|
1728
|
+
Primary responsibilities:
|
|
1729
|
+
- Identify behavioral regressions and hidden risk
|
|
1730
|
+
- Check architecture boundaries, dependency flow, and code quality
|
|
1731
|
+
- Validate tests are sufficient for the changed surface
|
|
1732
|
+
- Call out documentation or operational drift when it affects behavior
|
|
1733
|
+
|
|
1734
|
+
Completion standard:
|
|
1735
|
+
- Findings first, ordered by severity
|
|
1736
|
+
- Be specific about evidence, impact, and residual risk
|
|
1737
|
+
"""
|
|
1738
|
+
|
|
1739
|
+
[[skills.config]]
|
|
1740
|
+
path = ".agents/skills/lumenflow-gates"
|
|
1741
|
+
enabled = true
|
|
1742
|
+
|
|
1743
|
+
[[skills.config]]
|
|
1744
|
+
path = ".agents/skills/code-quality"
|
|
1745
|
+
enabled = true
|
|
1746
|
+
`,
|
|
1747
|
+
'general-purpose.toml': `name = "general-purpose"
|
|
1748
|
+
description = "Default agent for standard LumenFlow WU implementation, documentation, and cleanup work when no specialist agent is a better fit."
|
|
1749
|
+
model_reasoning_effort = "medium"
|
|
1750
|
+
sandbox_mode = "workspace-write"
|
|
1751
|
+
|
|
1752
|
+
developer_instructions = """
|
|
1753
|
+
You are the General Purpose Agent for LumenFlow development, operating under vendor-agnostic LumenFlow discipline.
|
|
1754
|
+
|
|
1755
|
+
Before starting:
|
|
1756
|
+
1. Read AGENTS.md, LUMENFLOW.md, and .lumenflow/constraints.md.
|
|
1757
|
+
2. Read the active WU YAML before making changes.
|
|
1758
|
+
3. Confirm you are in the claimed worktree before writing.
|
|
1759
|
+
4. Remember Codex subagent delegation is explicit-only; do not assume auto-match.
|
|
1760
|
+
|
|
1761
|
+
Primary responsibilities:
|
|
1762
|
+
- Standard WU implementation and cleanup
|
|
1763
|
+
- Documentation changes when no specialist is a better fit
|
|
1764
|
+
- Coordinating with shared LumenFlow skills and constraints
|
|
1765
|
+
|
|
1766
|
+
Completion standard:
|
|
1767
|
+
- Verify acceptance criteria are met
|
|
1768
|
+
- Run the appropriate gates before reporting success
|
|
1769
|
+
- Report blockers honestly instead of fabricating completion
|
|
1770
|
+
"""
|
|
1771
|
+
|
|
1772
|
+
[[skills.config]]
|
|
1773
|
+
path = ".agents/skills/design-first"
|
|
1774
|
+
enabled = true
|
|
1775
|
+
|
|
1776
|
+
[[skills.config]]
|
|
1777
|
+
path = ".agents/skills/wu-lifecycle"
|
|
1778
|
+
enabled = true
|
|
1779
|
+
|
|
1780
|
+
[[skills.config]]
|
|
1781
|
+
path = ".agents/skills/worktree-discipline"
|
|
1782
|
+
enabled = true
|
|
1783
|
+
|
|
1784
|
+
[[skills.config]]
|
|
1785
|
+
path = ".agents/skills/lumenflow-gates"
|
|
1786
|
+
enabled = true
|
|
1787
|
+
`,
|
|
1788
|
+
'initiative-architect.toml': `name = "initiative-architect"
|
|
1789
|
+
description = "Use for INIT-NNN planning, phase decomposition, WU sequencing, and cross-lane delivery design. Turns initiative goals into dependency-aware execution plans without taking implementation actions directly."
|
|
1790
|
+
model_reasoning_effort = "xhigh"
|
|
1791
|
+
sandbox_mode = "read-only"
|
|
1792
|
+
|
|
1793
|
+
developer_instructions = """
|
|
1794
|
+
You are the Initiative Architect, responsible for turning initiative-scale goals into executable, dependency-aware plans.
|
|
1795
|
+
|
|
1796
|
+
Before starting:
|
|
1797
|
+
1. Read AGENTS.md, LUMENFLOW.md, .lumenflow/constraints.md, the initiative spec, and any linked WU specs.
|
|
1798
|
+
2. Stay read-only; this role plans and reviews sequencing rather than implementing code directly.
|
|
1799
|
+
3. Remember Codex subagent delegation is explicit-only; you were invoked for planning depth, not generic execution.
|
|
1800
|
+
|
|
1801
|
+
Primary responsibilities:
|
|
1802
|
+
- Break initiatives into coherent phases and WUs
|
|
1803
|
+
- Make serial versus parallel boundaries explicit
|
|
1804
|
+
- Surface lane, docs, and rollout risks before implementation starts
|
|
1805
|
+
- Keep vendor-neutral surfaces separate from vendor-specific overlays
|
|
1806
|
+
|
|
1807
|
+
Completion standard:
|
|
1808
|
+
- Produce clear sequencing, dependency, and risk guidance
|
|
1809
|
+
- Leave implementers with concrete next steps, not vague suggestions
|
|
1810
|
+
"""
|
|
1811
|
+
|
|
1812
|
+
[[skills.config]]
|
|
1813
|
+
path = ".agents/skills/initiative-management"
|
|
1814
|
+
enabled = true
|
|
1815
|
+
`,
|
|
1816
|
+
'lumenflow-enforcer.toml': `name = "lumenflow-enforcer"
|
|
1817
|
+
description = "MANDATORY - Validate WU completeness, gates status, and LumenFlow compliance before wu:done. Blocks completion if criteria are not met."
|
|
1818
|
+
model_reasoning_effort = "low"
|
|
1819
|
+
sandbox_mode = "read-only"
|
|
1820
|
+
|
|
1821
|
+
developer_instructions = """
|
|
1822
|
+
You are the LumenFlow Enforcer, the final checkpoint before a WU can be marked complete.
|
|
1823
|
+
|
|
1824
|
+
Before starting:
|
|
1825
|
+
1. Read AGENTS.md, LUMENFLOW.md, .lumenflow/constraints.md, and the active WU YAML.
|
|
1826
|
+
2. Work read-only unless the parent task explicitly asks you to record findings elsewhere.
|
|
1827
|
+
3. Remember Codex subagent delegation is explicit-only; you are only active because you were named deliberately.
|
|
1828
|
+
|
|
1829
|
+
Primary responsibilities:
|
|
1830
|
+
- Verify every acceptance criterion has evidence
|
|
1831
|
+
- Confirm gates and verification steps have run
|
|
1832
|
+
- Surface missing docs, tests, or lifecycle state
|
|
1833
|
+
- Block incomplete work with actionable feedback
|
|
1834
|
+
|
|
1835
|
+
Completion standard:
|
|
1836
|
+
- Be strict about evidence, but not performative
|
|
1837
|
+
- Summarize what passed, what failed, and what must happen next
|
|
1838
|
+
"""
|
|
1839
|
+
|
|
1840
|
+
[[skills.config]]
|
|
1841
|
+
path = ".agents/skills/wu-lifecycle"
|
|
1842
|
+
enabled = true
|
|
1843
|
+
|
|
1844
|
+
[[skills.config]]
|
|
1845
|
+
path = ".agents/skills/lumenflow-gates"
|
|
1846
|
+
enabled = true
|
|
1847
|
+
`,
|
|
1848
|
+
'lumenflow-pm.toml': `name = "lumenflow-pm"
|
|
1849
|
+
description = "Use for WU claiming, blocking/unblocking, bug triage, or flow bottleneck identification. Manages backlog, WU lifecycle, and coordinates parallel agent execution across lanes."
|
|
1850
|
+
model_reasoning_effort = "xhigh"
|
|
1851
|
+
sandbox_mode = "workspace-write"
|
|
1852
|
+
|
|
1853
|
+
developer_instructions = """
|
|
1854
|
+
You are the LumenFlow Project Manager, responsible for backlog health, WU lifecycle coordination, and multi-agent execution.
|
|
1855
|
+
|
|
1856
|
+
Before starting:
|
|
1857
|
+
1. Read AGENTS.md, LUMENFLOW.md, .lumenflow/constraints.md, and the active WU or initiative specs.
|
|
1858
|
+
2. Confirm the requested lifecycle move matches the current repo state before acting.
|
|
1859
|
+
3. Remember Codex subagent delegation is explicit-only; make coordination decisions deliberately and transparently.
|
|
1860
|
+
|
|
1861
|
+
Primary responsibilities:
|
|
1862
|
+
- Claim, block, unblock, and complete WUs through the documented flow
|
|
1863
|
+
- Coordinate parallel execution across lanes without creating conflicts
|
|
1864
|
+
- Shape initiative execution order and unblock downstream work
|
|
1865
|
+
- Surface risks, stale dependencies, and flow bottlenecks early
|
|
1866
|
+
|
|
1867
|
+
Completion standard:
|
|
1868
|
+
- Keep state transitions accurate
|
|
1869
|
+
- Prefer the smallest coherent next action
|
|
1870
|
+
- Leave the repo in a state another agent can pick up cleanly
|
|
1871
|
+
"""
|
|
1872
|
+
|
|
1873
|
+
[[skills.config]]
|
|
1874
|
+
path = ".agents/skills/wu-lifecycle"
|
|
1875
|
+
enabled = true
|
|
1876
|
+
|
|
1877
|
+
[[skills.config]]
|
|
1878
|
+
path = ".agents/skills/worktree-discipline"
|
|
1879
|
+
enabled = true
|
|
1880
|
+
|
|
1881
|
+
[[skills.config]]
|
|
1882
|
+
path = ".agents/skills/multi-agent-coordination"
|
|
1883
|
+
enabled = true
|
|
1884
|
+
`,
|
|
1885
|
+
'test-engineer.toml': `name = "test-engineer"
|
|
1886
|
+
description = "Use before implementing features or bugs, when business logic changes, or when coverage gaps need closing. Enforces failing-test-first discipline, writes targeted suites, and checks edge-case coverage."
|
|
1887
|
+
model_reasoning_effort = "medium"
|
|
1888
|
+
sandbox_mode = "workspace-write"
|
|
1889
|
+
|
|
1890
|
+
developer_instructions = """
|
|
1891
|
+
You are the Test Engineer, responsible for maintaining test-first discipline and strong change coverage.
|
|
1892
|
+
|
|
1893
|
+
Before starting:
|
|
1894
|
+
1. Read AGENTS.md, LUMENFLOW.md, .lumenflow/constraints.md, and the active WU YAML.
|
|
1895
|
+
2. Confirm the expected testing policy for this WU before writing code.
|
|
1896
|
+
3. Remember Codex subagent delegation is explicit-only; you were invoked to focus on test design and coverage.
|
|
1897
|
+
|
|
1898
|
+
Primary responsibilities:
|
|
1899
|
+
- Write failing tests before implementation when policy requires TDD
|
|
1900
|
+
- Close coverage gaps for changed business logic
|
|
1901
|
+
- Exercise error paths and edge cases
|
|
1902
|
+
- Keep suites targeted, maintainable, and fast enough to trust
|
|
1903
|
+
|
|
1904
|
+
Completion standard:
|
|
1905
|
+
- Report the tested behaviors and remaining gaps
|
|
1906
|
+
- Avoid brittle tests that only mirror implementation details
|
|
1907
|
+
"""
|
|
1908
|
+
|
|
1909
|
+
[[skills.config]]
|
|
1910
|
+
path = ".agents/skills/tdd-workflow"
|
|
1911
|
+
enabled = true
|
|
1912
|
+
`,
|
|
1913
|
+
};
|
|
1565
1914
|
export const GATE_STUB_SCRIPTS = {
|
|
1566
1915
|
'spec:linter': 'echo "[lumenflow] spec:linter stub -- install a WU spec linter or replace this script" && exit 0',
|
|
1567
1916
|
lint: 'echo "[lumenflow] lint stub -- add ESLint or your preferred linter to enable this gate (e.g. eslint .)" && exit 0',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-templates.js","sourceRoot":"","sources":["../src/init-templates.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,yCAAyC;AAEzC;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,qBAAqB,GAAG,WAAW,CAAC,SAAS,CAAC;AACpD,MAAM,yBAAyB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC;IACnE,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,qBAAqB,CAAC;AAC1B,MAAM,wBAAwB,GAAG,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;IACtE,CAAC,CAAC,eAAe,CAAC,SAAS;IAC3B,CAAC,CAAC,GAAG,eAAe,CAAC,SAAS,GAAG,CAAC;AAEpC,mEAAmE;AACnE,sEAAsE;AACtE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,CAAC,qBAAqB,EAAE,aAAa,EAAE,QAAQ,CAAC;KAC7D;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,CAAC,oBAAoB,EAAE,YAAY,EAAE,QAAQ,CAAC;KAC3D;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,mBAAmB,EAAE,cAAc,CAA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C;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAA2B;IAC3D,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Ed;IACC,iBAAiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BpB;IACC,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BvB;IACC,sBAAsB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCzB;IACC,2BAA2B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B9B;IACC,yBAAyB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B5B;IACC,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCtB;IACC,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BvB;CACA,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,aAAa,EACX,kGAAkG;IACpG,IAAI,EAAE,mHAAmH;IACzH,SAAS,EACP,4HAA4H;IAC9H,iFAAiF;IACjF,+EAA+E;IAC/E,0FAA0F;IAC1F,mFAAmF;IACnF,MAAM,EACJ,8RAA8R;IAChS,cAAc,EACZ,uKAAuK;IACzK,6FAA6F;IAC7F,sFAAsF;IACtF,WAAW,EACT,gGAAgG;CACnG,CAAC"}
|
package/dist/init.js
CHANGED
|
@@ -42,13 +42,14 @@ import { syncCoreDocs } from './docs-sync.js';
|
|
|
42
42
|
// WU-1643: Import template constants from dedicated data module
|
|
43
43
|
// WU-2399: Most template imports moved to sub-modules (init-docs-scaffolder, init-package-config,
|
|
44
44
|
// init-safety-scripts). Only imports still used directly in init.ts remain here.
|
|
45
|
-
import { CLAUDE_MD_TEMPLATE, CLAUDE_SETTINGS_TEMPLATE, CURSOR_RULES_TEMPLATE, WINDSURF_RULES_TEMPLATE, CLINE_RULES_TEMPLATE, AIDER_CONF_TEMPLATE, MCP_JSON_TEMPLATE, DEFAULT_LANE_DEFINITIONS, } from './init-templates.js';
|
|
45
|
+
import { CLAUDE_MD_TEMPLATE, CLAUDE_SETTINGS_TEMPLATE, CURSOR_RULES_TEMPLATE, WINDSURF_RULES_TEMPLATE, CLINE_RULES_TEMPLATE, AIDER_CONF_TEMPLATE, CODEX_AGENT_TEMPLATES, MCP_JSON_TEMPLATE, DEFAULT_LANE_DEFINITIONS, } from './init-templates.js';
|
|
46
46
|
// WU-2399: Import extracted sub-modules for decomposed scaffolding
|
|
47
|
-
import { scaffoldFullDocs, scaffoldAgentOnboardingDocs,
|
|
47
|
+
import { scaffoldFullDocs, scaffoldAgentOnboardingDocs, scaffoldManagedSkills, scaffoldFrameworkOverlay, } from './init-docs-scaffolder.js';
|
|
48
48
|
import { injectPackageJsonScripts } from './init-package-config.js';
|
|
49
49
|
import { scaffoldGitignore, scaffoldPrettierignore, scaffoldSafetyScripts, getFileMode, } from './init-safety-scripts.js';
|
|
50
50
|
// WU-1644: Import detection helpers from dedicated module
|
|
51
51
|
import { getDocsPath, detectDocsStructure, detectDefaultClient, isGitRepo, hasGitCommits, detectGitStateConfig, } from './init-detection.js';
|
|
52
|
+
import { getSkillProjectionTargetsForClient } from './skills-projection.js';
|
|
52
53
|
// WU-1644: Re-export detection functions for backwards compatibility
|
|
53
54
|
export { detectIDEEnvironment, checkPrerequisites, getDocsPath, detectDocsStructure, } from './init-detection.js';
|
|
54
55
|
// WU-1644: Import scaffolding helpers from dedicated module
|
|
@@ -200,6 +201,7 @@ const LUMENFLOW_DIR = '.lumenflow';
|
|
|
200
201
|
const LUMENFLOW_AGENTS_DIR = `${LUMENFLOW_DIR}/agents`;
|
|
201
202
|
const CLAUDE_DIR = '.claude';
|
|
202
203
|
const CLAUDE_AGENTS_DIR = path.join(CLAUDE_DIR, 'agents');
|
|
204
|
+
const CODEX_AGENTS_DIR = path.join('.codex', 'agents');
|
|
203
205
|
/**
|
|
204
206
|
* WU-1362: Check branch guard before writing tracked files
|
|
205
207
|
*
|
|
@@ -867,6 +869,20 @@ async function scaffoldClientFiles(targetDir, options, result, tokens, client) {
|
|
|
867
869
|
// WU-2383: Vendor bootstrap files use merge-block so existing files get
|
|
868
870
|
// LumenFlow content injected instead of being silently skipped.
|
|
869
871
|
const vendorBootstrapMode = fileMode === 'force' ? 'force' : 'merge-block';
|
|
872
|
+
const skillProjectionClient = client === 'claude' || client === 'all'
|
|
873
|
+
? LUMENFLOW_CLIENT_IDS.CLAUDE_CODE
|
|
874
|
+
: client === 'codex'
|
|
875
|
+
? LUMENFLOW_CLIENT_IDS.CODEX_CLI
|
|
876
|
+
: client === 'cursor'
|
|
877
|
+
? LUMENFLOW_CLIENT_IDS.CURSOR
|
|
878
|
+
: client;
|
|
879
|
+
if (client === 'claude' ||
|
|
880
|
+
client === 'codex' ||
|
|
881
|
+
client === 'cursor' ||
|
|
882
|
+
client === 'windsurf' ||
|
|
883
|
+
client === 'all') {
|
|
884
|
+
await scaffoldManagedSkills(targetDir, options, result, tokens, getSkillProjectionTargetsForClient(skillProjectionClient));
|
|
885
|
+
}
|
|
870
886
|
// Claude Code
|
|
871
887
|
if (client === 'claude' || client === 'all') {
|
|
872
888
|
// WU-1171: Single CLAUDE.md at root only (no .claude/CLAUDE.md duplication)
|
|
@@ -905,8 +921,6 @@ async function scaffoldClientFiles(targetDir, options, result, tokens, client) {
|
|
|
905
921
|
// WU-1505: Generate session-start script from shared logic source.
|
|
906
922
|
const sessionStartScript = generateSessionStartRecoveryScript();
|
|
907
923
|
await createExecutableScript(path.join(hooksDir, CLAUDE_HOOKS.SCRIPTS.SESSION_START_RECOVERY), sessionStartScript, options.force ? 'force' : 'skip', result, targetDir);
|
|
908
|
-
// WU-1083: Scaffold Claude skills
|
|
909
|
-
await scaffoldClaudeSkills(targetDir, options, result, tokens);
|
|
910
924
|
// WU-1083: Scaffold agent onboarding docs for Claude vendor (even without --full)
|
|
911
925
|
// WU-1965: Guard with !options.full to prevent duplicate scaffolding.
|
|
912
926
|
// When full=true, scaffoldFullDocs() already called scaffoldAgentOnboardingDocs().
|
|
@@ -943,8 +957,14 @@ async function scaffoldClientFiles(targetDir, options, result, tokens, client) {
|
|
|
943
957
|
}
|
|
944
958
|
await createFile(path.join(windsurfRulesDir, 'lumenflow.md'), processTemplate(windsurfContent, tokens), vendorBootstrapMode, result, targetDir);
|
|
945
959
|
}
|
|
946
|
-
// WU-1171: Codex
|
|
947
|
-
//
|
|
960
|
+
// WU-1171/WU-2847/WU-2848: Codex uses AGENTS.md, shared projected skills,
|
|
961
|
+
// and a Codex-specific subagent overlay in `.codex/agents/`.
|
|
962
|
+
if (client === 'codex' || client === 'all') {
|
|
963
|
+
await createDirectory(path.join(targetDir, CODEX_AGENTS_DIR), result, targetDir);
|
|
964
|
+
for (const [fileName, content] of Object.entries(CODEX_AGENT_TEMPLATES)) {
|
|
965
|
+
await createFile(path.join(targetDir, CODEX_AGENTS_DIR, fileName), processTemplate(content, tokens), vendorBootstrapMode, result, targetDir);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
948
968
|
// WU-1177: Cline uses .clinerules file at project root
|
|
949
969
|
if (client === 'cline' || client === 'all') {
|
|
950
970
|
// Try to load from template, fallback to hardcoded
|