@openlife/cli 1.9.3 → 1.10.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/.catalog/agents/test-agent/AGENT.md +1 -1
- package/.catalog/mcps/test-mcp/mcp.json +1 -1
- package/.catalog/skills/sample-from-url/IMPORTED_REFERENCE.md +2 -2
- package/.catalog/skills/test-skill/REFERENCE.md +1 -1
- package/.catalog/squads/test-squad/SQUAD.md +1 -1
- package/dist/test_openlife_method_inventory.js +31 -3
- package/dist-templates/claude-code/commands/openlife/agents/atlas.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/builder.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/conductor.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/forge.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/genesis.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/lyra.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/maestro.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/mesh.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/prism.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/sentinel.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/steward.md +5 -1
- package/dist-templates/claude-code/commands/openlife/agents/vortex.md +5 -1
- package/dist-templates/claude-code/commands/openlife/ask.md +23 -6
- package/dist-templates/claude-code/commands/openlife/audit.md +31 -2
- package/dist-templates/claude-code/commands/openlife/doctor.md +0 -2
- package/dist-templates/claude-code/commands/openlife/dream.md +23 -2
- package/dist-templates/claude-code/commands/openlife/explore.md +20 -2
- package/dist-templates/claude-code/commands/openlife/flow/brownfield-discovery.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/brownfield-fullstack.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/brownfield-service.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/brownfield-ui.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/epic.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/greenfield-fullstack.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/greenfield-service.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/greenfield-ui.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/qa-loop.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/release.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/spec-pipeline.md +24 -6
- package/dist-templates/claude-code/commands/openlife/flow/story-cycle.md +24 -6
- package/dist-templates/claude-code/commands/openlife/health.md +25 -2
- package/dist-templates/claude-code/commands/openlife/plan.md +26 -2
- package/dist-templates/claude-code/commands/openlife/review.md +22 -2
- package/dist-templates/claude-code/commands/openlife/ship.md +23 -2
- package/dist-templates/claude-code/commands/openlife/start.md +21 -8
- package/dist-templates/claude-code/commands/openlife/status.md +0 -2
- package/dist-templates/claude-code/commands/openlife/story.md +20 -4
- package/dist-templates/codex/commands/openlife/agents/atlas.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/builder.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/conductor.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/forge.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/genesis.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/lyra.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/maestro.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/mesh.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/prism.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/sentinel.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/steward.md +5 -1
- package/dist-templates/codex/commands/openlife/agents/vortex.md +5 -1
- package/dist-templates/codex/commands/openlife/ask.md +23 -6
- package/dist-templates/codex/commands/openlife/audit.md +31 -2
- package/dist-templates/codex/commands/openlife/doctor.md +0 -2
- package/dist-templates/codex/commands/openlife/dream.md +23 -2
- package/dist-templates/codex/commands/openlife/explore.md +20 -2
- package/dist-templates/codex/commands/openlife/flow/brownfield-discovery.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/brownfield-fullstack.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/brownfield-service.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/brownfield-ui.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/epic.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/greenfield-fullstack.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/greenfield-service.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/greenfield-ui.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/qa-loop.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/release.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/spec-pipeline.md +24 -6
- package/dist-templates/codex/commands/openlife/flow/story-cycle.md +24 -6
- package/dist-templates/codex/commands/openlife/health.md +25 -2
- package/dist-templates/codex/commands/openlife/plan.md +26 -2
- package/dist-templates/codex/commands/openlife/review.md +22 -2
- package/dist-templates/codex/commands/openlife/ship.md +23 -2
- package/dist-templates/codex/commands/openlife/start.md +21 -8
- package/dist-templates/codex/commands/openlife/status.md +0 -2
- package/dist-templates/codex/commands/openlife/story.md +20 -4
- package/dist-templates/gemini-cli/commands/openlife/agents/atlas.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/builder.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/conductor.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/forge.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/genesis.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/lyra.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/maestro.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/mesh.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/prism.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/sentinel.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/steward.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/agents/vortex.md +5 -1
- package/dist-templates/gemini-cli/commands/openlife/ask.md +23 -6
- package/dist-templates/gemini-cli/commands/openlife/audit.md +31 -2
- package/dist-templates/gemini-cli/commands/openlife/doctor.md +0 -2
- package/dist-templates/gemini-cli/commands/openlife/dream.md +23 -2
- package/dist-templates/gemini-cli/commands/openlife/explore.md +20 -2
- package/dist-templates/gemini-cli/commands/openlife/flow/brownfield-discovery.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/brownfield-fullstack.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/brownfield-service.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/brownfield-ui.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/epic.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/greenfield-fullstack.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/greenfield-service.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/greenfield-ui.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/qa-loop.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/release.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/spec-pipeline.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/flow/story-cycle.md +24 -6
- package/dist-templates/gemini-cli/commands/openlife/health.md +25 -2
- package/dist-templates/gemini-cli/commands/openlife/plan.md +26 -2
- package/dist-templates/gemini-cli/commands/openlife/review.md +22 -2
- package/dist-templates/gemini-cli/commands/openlife/ship.md +23 -2
- package/dist-templates/gemini-cli/commands/openlife/start.md +21 -8
- package/dist-templates/gemini-cli/commands/openlife/status.md +0 -2
- package/dist-templates/gemini-cli/commands/openlife/story.md +20 -4
- package/package.json +1 -1
- package/scripts/generate-slash-commands.js +209 -34
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run the QA gate on a story
|
|
2
|
+
description: Run the QA gate on a story — host LLM acts as Sentinel and applies 7 quality checks
|
|
3
3
|
allowed-tools:
|
|
4
4
|
- Read
|
|
5
5
|
- Write
|
|
@@ -11,4 +11,24 @@ allowed-tools:
|
|
|
11
11
|
- AskUserQuestion
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Mode:** host-native (the host LLM running this conversation answers directly — no external API key required).
|
|
15
|
+
|
|
16
|
+
Read `.openlife/method/agents/sentinel.md`, become Sentinel, and run `*qa-gate` on the target (story id or file path from `$ARGUMENTS`).
|
|
17
|
+
|
|
18
|
+
Apply the 7 checks: code review, unit tests, AC coverage, no regressions, performance, security (OWASP-grade), documentation.
|
|
19
|
+
|
|
20
|
+
Return verdict: PASS / CONCERNS / FAIL / WAIVED with structured findings (severity + category + file:line + recommendation per finding).
|
|
21
|
+
|
|
22
|
+
If verdict is FAIL with HIGH/CRITICAL issues, suggest `/openlife:agents:builder` for the fix-loop iteration.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### Want the external model chain instead?
|
|
27
|
+
|
|
28
|
+
If you specifically need the configured `models.json` chain (for cost-tracking, batch, or non-host contexts), run the command in a terminal:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
openlife review "$ARGUMENTS"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
That path uses the Brain dispatcher and requires the appropriate API key in `.env`. The slash command (this one) intentionally bypasses external APIs to keep host-CLI usage zero-config.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run the continuous-deployment
|
|
2
|
+
description: Run the continuous-deployment pipeline — host LLM orchestrates Vortex through PR → merge → tag → publish
|
|
3
3
|
allowed-tools:
|
|
4
4
|
- Read
|
|
5
5
|
- Write
|
|
@@ -11,4 +11,25 @@ allowed-tools:
|
|
|
11
11
|
- AskUserQuestion
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Mode:** host-native (the host LLM running this conversation answers directly — no external API key required).
|
|
15
|
+
|
|
16
|
+
Orchestrate the continuous-deployment workflow yourself.
|
|
17
|
+
|
|
18
|
+
1. Read `dist-templates/workflows/continuous-deployment.yaml` to understand the phases
|
|
19
|
+
2. Read `.openlife/method/agents/vortex.md` and become Vortex for steps that require the EXCLUSIVE git/PR/release authority
|
|
20
|
+
3. Walk through: pre-release QA → open PR → wait CI → merge → version bump → tag → publish → release notes → log event
|
|
21
|
+
4. EVERY destructive step (push, tag, publish) requires explicit user OK before proceeding — never auto-merge
|
|
22
|
+
|
|
23
|
+
Vortex is the only persona authorized to push, open/merge PRs, and run releases.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### Want the external model chain instead?
|
|
28
|
+
|
|
29
|
+
If you specifically need the configured `models.json` chain (for cost-tracking, batch, or non-host contexts), run the command in a terminal:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
openlife ship "$ARGUMENTS"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
That path uses the Brain dispatcher and requires the appropriate API key in `.env`. The slash command (this one) intentionally bypasses external APIs to keep host-CLI usage zero-config.
|
|
@@ -11,15 +11,28 @@ allowed-tools:
|
|
|
11
11
|
- AskUserQuestion
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Mode:** host-native (the host LLM running this conversation answers directly — no external API key required).
|
|
15
|
+
|
|
16
|
+
Detect the project mode and route to the right workflow.
|
|
15
17
|
|
|
16
18
|
1. Read `.openlife/project.json` if it exists. Use its `mode` field (`greenfield` / `brownfield` / `not-applicable`).
|
|
17
|
-
2. If missing, ask the user via AskUserQuestion:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- greenfield +
|
|
21
|
-
- greenfield +
|
|
22
|
-
-
|
|
23
|
-
- brownfield + first time → `openlife flow run brownfield-discovery`
|
|
19
|
+
2. If missing, ask the user via AskUserQuestion: "Is this a brand new project (greenfield) or existing codebase (brownfield)?"
|
|
20
|
+
3. Based on the answer, decide and announce the recommended workflow:
|
|
21
|
+
- greenfield + fullstack → run `/openlife:flow:greenfield-fullstack`
|
|
22
|
+
- greenfield + service → run `/openlife:flow:greenfield-service`
|
|
23
|
+
- greenfield + ui → run `/openlife:flow:greenfield-ui`
|
|
24
|
+
- brownfield + first time → run `/openlife:flow:brownfield-discovery`
|
|
24
25
|
- brownfield + already discovered → ask sub-mode (fullstack/service/ui)
|
|
25
26
|
4. If mode was just set, persist via `openlife project-mode set <mode>`.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### Want the external model chain instead?
|
|
31
|
+
|
|
32
|
+
If you specifically need the configured `models.json` chain (for cost-tracking, batch, or non-host contexts), run the command in a terminal:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
openlife start "$ARGUMENTS"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That path uses the Brain dispatcher and requires the appropriate API key in `.env`. The slash command (this one) intentionally bypasses external APIs to keep host-CLI usage zero-config.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create the next story
|
|
2
|
+
description: Create the next story (Conductor) or validate a draft (Steward) — host LLM acts as the right persona
|
|
3
3
|
allowed-tools:
|
|
4
4
|
- Read
|
|
5
5
|
- Write
|
|
@@ -11,8 +11,24 @@ allowed-tools:
|
|
|
11
11
|
- AskUserQuestion
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Mode:** host-native (the host LLM running this conversation answers directly — no external API key required).
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Determine intent from `$ARGUMENTS`:
|
|
17
|
+
|
|
18
|
+
- If the user wants to CREATE a story → read `.openlife/method/agents/conductor.md`, become Conductor, run `*create-next-story`. Apply the story template (frontmatter, title, description, AC, scope, deps, complexity, business value, risks, DoD).
|
|
19
|
+
- If the user wants to VALIDATE a draft → read `.openlife/method/agents/steward.md`, become Steward, run `*validate-story` with the 10-point checklist. Verdict: GO (≥7/10) or NO-GO (with required fixes).
|
|
18
20
|
- If unclear, ask via AskUserQuestion which action to take.
|
|
21
|
+
|
|
22
|
+
You play the persona directly — no shellout.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### Want the external model chain instead?
|
|
27
|
+
|
|
28
|
+
If you specifically need the configured `models.json` chain (for cost-tracking, batch, or non-host contexts), run the command in a terminal:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
openlife story "$ARGUMENTS"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
That path uses the Brain dispatcher and requires the appropriate API key in `.env`. The slash command (this one) intentionally bypasses external APIs to keep host-CLI usage zero-config.
|
package/package.json
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// scripts/generate-slash-commands.js
|
|
3
|
-
//
|
|
3
|
+
//
|
|
4
|
+
// Host-Native generator (v1.10.0+).
|
|
4
5
|
// Produces files under dist-templates/<host>/commands/openlife/{,agents/,flow/}
|
|
5
6
|
// for hosts: claude-code, gemini-cli, codex.
|
|
6
7
|
//
|
|
8
|
+
// Architecture (v1.10.0):
|
|
9
|
+
// LLM-reasoning commands respond DIRECTLY using the host's LLM (Claude in
|
|
10
|
+
// Claude Code, Gemini in Gemini CLI, etc.) by reading the OpenLife method
|
|
11
|
+
// catalog at `.openlife/method/` for persona/workflow context. They do NOT
|
|
12
|
+
// shell out to `openlife <verb>` (which would route to an external Brain
|
|
13
|
+
// chain and require API keys).
|
|
14
|
+
//
|
|
15
|
+
// Runtime-state commands (doctor, status, project-mode get) still shell
|
|
16
|
+
// out — they query real local state, not LLM reasoning.
|
|
17
|
+
//
|
|
18
|
+
// External Brain mode is opt-in via the `--external` flag on the command
|
|
19
|
+
// or `OPENLIFE_USE_EXTERNAL_BRAIN=true` env var — useful for headless / CI
|
|
20
|
+
// contexts or when the user explicitly wants the configured model chain.
|
|
21
|
+
//
|
|
7
22
|
// Idempotent: re-running overwrites with the canonical content.
|
|
8
23
|
|
|
9
24
|
const fs = require('fs');
|
|
@@ -15,70 +30,168 @@ const REPO_ROOT = path.resolve(__dirname, '..');
|
|
|
15
30
|
// ─── Command catalog ────────────────────────────────────────────────────
|
|
16
31
|
|
|
17
32
|
const TOP_LEVEL = [
|
|
33
|
+
// ── LLM-reasoning: Claude responds directly, no shellout ──
|
|
18
34
|
{
|
|
19
35
|
name: 'ask',
|
|
20
|
-
|
|
36
|
+
mode: 'host-native',
|
|
37
|
+
persona: 'lyra',
|
|
38
|
+
description: 'Ask OpenLife — the host LLM answers directly using the OpenLife method context (no external API key required)',
|
|
21
39
|
argumentHint: '<question>',
|
|
22
|
-
|
|
23
|
-
|
|
40
|
+
instruction: `Answer the user's question directly using your own reasoning. You ARE the OpenLife Brain when invoked through a host CLI.
|
|
41
|
+
|
|
42
|
+
Optional context (read only when relevant to the question):
|
|
43
|
+
- \`.openlife/method/agents/lyra.md\` — research / synthesis persona to adopt when the question is research-shaped
|
|
44
|
+
- \`.openlife/project.json\` — current project mode (greenfield/brownfield)
|
|
45
|
+
- \`.catalog/\` — user's agents, squads, skills, capabilities
|
|
46
|
+
- \`dist-templates/workflows/\` — bundled method workflows
|
|
47
|
+
|
|
48
|
+
If the question is open-ended or asks for OpenLife status, prefer answering from this conversation's existing context rather than reading files speculatively. If the user explicitly wants the external model chain (e.g., for batch / cron / cost-tracking reasons), they can invoke \`openlife ask "..."\` directly in a terminal or pass \`--external\` to this command.`,
|
|
24
49
|
},
|
|
25
50
|
{
|
|
26
51
|
name: 'doctor',
|
|
52
|
+
mode: 'runtime',
|
|
27
53
|
description: 'Run OpenLife health checks (API keys, model chain, runtime catalogs, daemon state)',
|
|
28
|
-
|
|
29
|
-
keep: true,
|
|
54
|
+
instruction: 'Run `openlife system doctor` and walk the user through results.\n\nFor each failed check: quote the line, explain in 1 sentence what it verifies, suggest the concrete fix.',
|
|
30
55
|
},
|
|
31
56
|
{
|
|
32
57
|
name: 'status',
|
|
58
|
+
mode: 'runtime',
|
|
33
59
|
description: 'Show OpenLife system status — installed profile, host, catalog counts, daemon state',
|
|
34
|
-
|
|
35
|
-
keep: true,
|
|
60
|
+
instruction: 'Run `openlife status --json` and present a tight summary of: active profile, host CLIs installed, catalog counts (agents/squads/skills), daemon heartbeat freshness, telegram allowed user.',
|
|
36
61
|
},
|
|
37
62
|
{
|
|
38
63
|
name: 'dream',
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
64
|
+
mode: 'host-native',
|
|
65
|
+
persona: 'lyra',
|
|
66
|
+
description: 'Dream Organizer — surface ideas, pending stories, and prioritization from accumulated context (host LLM answers directly)',
|
|
67
|
+
instruction: `Run the OpenLife Dream Organizer using your own reasoning, not an external model.
|
|
68
|
+
|
|
69
|
+
1. Read recent context from this conversation + any planning files the user has open
|
|
70
|
+
2. Optionally read \`.catalog/\` for project-specific ideas already captured
|
|
71
|
+
3. Surface unprioritized ideas, pending stories, and recommendations grouped by theme
|
|
72
|
+
4. Be opinionated about priority order — don't return a flat list
|
|
73
|
+
|
|
74
|
+
If the user wants the external model chain for richer ideation: \`openlife dream "..."\` in a terminal.`,
|
|
42
75
|
},
|
|
43
76
|
{
|
|
44
77
|
name: 'start',
|
|
78
|
+
mode: 'host-native',
|
|
45
79
|
description: 'Bootstrap or resume work — reads .openlife/project.json mode and routes to greenfield or brownfield flow',
|
|
46
|
-
|
|
80
|
+
instruction: `Detect the project mode and route to the right workflow.
|
|
81
|
+
|
|
82
|
+
1. Read \`.openlife/project.json\` if it exists. Use its \`mode\` field (\`greenfield\` / \`brownfield\` / \`not-applicable\`).
|
|
83
|
+
2. If missing, ask the user via AskUserQuestion: "Is this a brand new project (greenfield) or existing codebase (brownfield)?"
|
|
84
|
+
3. Based on the answer, decide and announce the recommended workflow:
|
|
85
|
+
- greenfield + fullstack → run \`/openlife:flow:greenfield-fullstack\`
|
|
86
|
+
- greenfield + service → run \`/openlife:flow:greenfield-service\`
|
|
87
|
+
- greenfield + ui → run \`/openlife:flow:greenfield-ui\`
|
|
88
|
+
- brownfield + first time → run \`/openlife:flow:brownfield-discovery\`
|
|
89
|
+
- brownfield + already discovered → ask sub-mode (fullstack/service/ui)
|
|
90
|
+
4. If mode was just set, persist via \`openlife project-mode set <mode>\`.`,
|
|
47
91
|
},
|
|
48
92
|
{
|
|
49
93
|
name: 'plan',
|
|
50
|
-
|
|
51
|
-
|
|
94
|
+
mode: 'host-native',
|
|
95
|
+
persona: 'genesis',
|
|
96
|
+
description: 'Run the spec pipeline (gather → assess → research → write → critique → plan) — host LLM orchestrates the 6 phases',
|
|
97
|
+
instruction: `Orchestrate the spec-pipeline workflow YOURSELF, phase by phase. You play multiple personas inline.
|
|
98
|
+
|
|
99
|
+
1. Read \`dist-templates/workflows/spec-pipeline.yaml\` to understand the phases
|
|
100
|
+
2. Phase 1 — Gather: become @openlife-genesis (read \`.openlife/method/agents/genesis.md\`) and elicit requirements from the user via AskUserQuestion
|
|
101
|
+
3. Phase 2 — Assess: become @openlife-atlas, score the 5 complexity dimensions
|
|
102
|
+
4. Phase 3 — Research (skip if SIMPLE complexity): become @openlife-lyra, surface unknowns
|
|
103
|
+
5. Phase 4 — Write: become @openlife-genesis again, draft spec.md
|
|
104
|
+
6. Phase 5 — Critique: become @openlife-sentinel, return verdict (APPROVED / NEEDS_REVISION / BLOCKED)
|
|
105
|
+
7. Phase 6 — Plan: become @openlife-atlas, generate implementation.yaml
|
|
106
|
+
|
|
107
|
+
Each phase ends with the user explicitly OK'ing before the next.`,
|
|
52
108
|
},
|
|
53
109
|
{
|
|
54
110
|
name: 'story',
|
|
55
|
-
|
|
56
|
-
|
|
111
|
+
mode: 'host-native',
|
|
112
|
+
description: 'Create the next story (Conductor) or validate a draft (Steward) — host LLM acts as the right persona',
|
|
113
|
+
instruction: `Determine intent from \`$ARGUMENTS\`:
|
|
114
|
+
|
|
115
|
+
- If the user wants to CREATE a story → read \`.openlife/method/agents/conductor.md\`, become Conductor, run \`*create-next-story\`. Apply the story template (frontmatter, title, description, AC, scope, deps, complexity, business value, risks, DoD).
|
|
116
|
+
- If the user wants to VALIDATE a draft → read \`.openlife/method/agents/steward.md\`, become Steward, run \`*validate-story\` with the 10-point checklist. Verdict: GO (≥7/10) or NO-GO (with required fixes).
|
|
117
|
+
- If unclear, ask via AskUserQuestion which action to take.
|
|
118
|
+
|
|
119
|
+
You play the persona directly — no shellout.`,
|
|
57
120
|
},
|
|
58
121
|
{
|
|
59
122
|
name: 'review',
|
|
60
|
-
|
|
61
|
-
|
|
123
|
+
mode: 'host-native',
|
|
124
|
+
persona: 'sentinel',
|
|
125
|
+
description: 'Run the QA gate on a story — host LLM acts as Sentinel and applies 7 quality checks',
|
|
126
|
+
instruction: `Read \`.openlife/method/agents/sentinel.md\`, become Sentinel, and run \`*qa-gate\` on the target (story id or file path from \`$ARGUMENTS\`).
|
|
127
|
+
|
|
128
|
+
Apply the 7 checks: code review, unit tests, AC coverage, no regressions, performance, security (OWASP-grade), documentation.
|
|
129
|
+
|
|
130
|
+
Return verdict: PASS / CONCERNS / FAIL / WAIVED with structured findings (severity + category + file:line + recommendation per finding).
|
|
131
|
+
|
|
132
|
+
If verdict is FAIL with HIGH/CRITICAL issues, suggest \`/openlife:agents:builder\` for the fix-loop iteration.`,
|
|
62
133
|
},
|
|
63
134
|
{
|
|
64
135
|
name: 'ship',
|
|
65
|
-
|
|
66
|
-
|
|
136
|
+
mode: 'host-native',
|
|
137
|
+
persona: 'vortex',
|
|
138
|
+
description: 'Run the continuous-deployment pipeline — host LLM orchestrates Vortex through PR → merge → tag → publish',
|
|
139
|
+
instruction: `Orchestrate the continuous-deployment workflow yourself.
|
|
140
|
+
|
|
141
|
+
1. Read \`dist-templates/workflows/continuous-deployment.yaml\` to understand the phases
|
|
142
|
+
2. Read \`.openlife/method/agents/vortex.md\` and become Vortex for steps that require the EXCLUSIVE git/PR/release authority
|
|
143
|
+
3. Walk through: pre-release QA → open PR → wait CI → merge → version bump → tag → publish → release notes → log event
|
|
144
|
+
4. EVERY destructive step (push, tag, publish) requires explicit user OK before proceeding — never auto-merge
|
|
145
|
+
|
|
146
|
+
Vortex is the only persona authorized to push, open/merge PRs, and run releases.`,
|
|
67
147
|
},
|
|
68
148
|
{
|
|
69
149
|
name: 'explore',
|
|
70
|
-
|
|
71
|
-
|
|
150
|
+
mode: 'host-native',
|
|
151
|
+
persona: 'lyra',
|
|
152
|
+
description: 'Exploratory ideation — host LLM acts as Lyra for divergent brainstorming then convergent narrative',
|
|
153
|
+
instruction: `Read \`.openlife/method/agents/lyra.md\`, become Lyra, and run \`*brainstorm "$ARGUMENTS"\`.
|
|
154
|
+
|
|
155
|
+
Surface options + tradeoffs. Mark confidence per claim (high / medium / low). Cite sources when claims are non-obvious.
|
|
156
|
+
|
|
157
|
+
Do NOT commit to a plan in this command — that's \`/openlife:plan\`. Explore is divergent; Plan is convergent.`,
|
|
72
158
|
},
|
|
73
159
|
{
|
|
74
160
|
name: 'audit',
|
|
75
|
-
|
|
76
|
-
|
|
161
|
+
mode: 'host-native',
|
|
162
|
+
persona: 'genesis',
|
|
163
|
+
description: 'Run brownfield-discovery — host LLM orchestrates the 10-phase audit of an existing codebase',
|
|
164
|
+
instruction: `Orchestrate the brownfield-discovery workflow yourself, playing multiple personas inline.
|
|
165
|
+
|
|
166
|
+
1. Read \`dist-templates/workflows/brownfield-discovery.yaml\` to understand the 10 phases
|
|
167
|
+
2. Walk through:
|
|
168
|
+
- Phase 1 (Atlas): system-architecture.md
|
|
169
|
+
- Phase 2 (Mesh, conditional): SCHEMA.md + DB-AUDIT.md
|
|
170
|
+
- Phase 3 (Prism, conditional): frontend-spec.md
|
|
171
|
+
- Phase 4 (Atlas): technical-debt-DRAFT.md
|
|
172
|
+
- Phase 5 (Mesh): db-specialist-review.md
|
|
173
|
+
- Phase 6 (Prism): ux-specialist-review.md
|
|
174
|
+
- Phase 7 (Sentinel): qa-review.md (gate: APPROVED / NEEDS WORK)
|
|
175
|
+
- Phase 8 (Atlas): technical-debt-assessment.md (final)
|
|
176
|
+
- Phase 9 (Lyra): TECHNICAL-DEBT-REPORT.md (executive)
|
|
177
|
+
- Phase 10 (Genesis): Epic + stories ready for backlog
|
|
178
|
+
|
|
179
|
+
Each phase ends with the user OK'ing before the next.`,
|
|
77
180
|
},
|
|
78
181
|
{
|
|
79
182
|
name: 'health',
|
|
80
|
-
|
|
81
|
-
|
|
183
|
+
mode: 'host-native',
|
|
184
|
+
description: 'Extended health check — combines `doctor` runtime check with Maestro\'s framework integrity review',
|
|
185
|
+
instruction: `Two-step health check:
|
|
186
|
+
|
|
187
|
+
1. Run \`openlife system doctor\` (real shell command) to capture API keys, model chain, catalog state, daemon state
|
|
188
|
+
2. Read \`.openlife/method/agents/maestro.md\`, become Maestro, and check cross-agent integrity:
|
|
189
|
+
- Catalog completeness (314 agents / 46 squads / 55 skills present?)
|
|
190
|
+
- Missing handoff artifacts in \`.openlife/handoffs/\`
|
|
191
|
+
- Draft components pending promotion in \`.catalog/{agents,squads,skills}/<id>/\` with \`status: draft\`
|
|
192
|
+
- Any contradictions between \`.openlife/project.json\` mode and active workflow
|
|
193
|
+
|
|
194
|
+
Present both diagnostics in one consolidated report.`,
|
|
82
195
|
},
|
|
83
196
|
];
|
|
84
197
|
|
|
@@ -116,6 +229,25 @@ const FLOWS = [
|
|
|
116
229
|
|
|
117
230
|
function renderTopLevel(cmd) {
|
|
118
231
|
const hintLine = cmd.argumentHint ? `argument-hint: "${cmd.argumentHint}"\n` : '';
|
|
232
|
+
|
|
233
|
+
// Runtime-state commands shell out (real diagnostics, not LLM reasoning).
|
|
234
|
+
if (cmd.mode === 'runtime') {
|
|
235
|
+
return `---
|
|
236
|
+
description: ${cmd.description}
|
|
237
|
+
${hintLine}allowed-tools:
|
|
238
|
+
- Read
|
|
239
|
+
- Bash(openlife:*)
|
|
240
|
+
- Grep
|
|
241
|
+
- Glob
|
|
242
|
+
- Agent
|
|
243
|
+
- AskUserQuestion
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
${cmd.instruction}
|
|
247
|
+
`;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Host-native LLM-reasoning commands respond directly using the host LLM.
|
|
119
251
|
return `---
|
|
120
252
|
description: ${cmd.description}
|
|
121
253
|
${hintLine}allowed-tools:
|
|
@@ -129,7 +261,21 @@ ${hintLine}allowed-tools:
|
|
|
129
261
|
- AskUserQuestion
|
|
130
262
|
---
|
|
131
263
|
|
|
132
|
-
|
|
264
|
+
**Mode:** host-native (the host LLM running this conversation answers directly — no external API key required).
|
|
265
|
+
|
|
266
|
+
${cmd.instruction}
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
### Want the external model chain instead?
|
|
271
|
+
|
|
272
|
+
If you specifically need the configured \`models.json\` chain (for cost-tracking, batch, or non-host contexts), run the command in a terminal:
|
|
273
|
+
|
|
274
|
+
\`\`\`bash
|
|
275
|
+
openlife ${cmd.name} "$ARGUMENTS"
|
|
276
|
+
\`\`\`
|
|
277
|
+
|
|
278
|
+
That path uses the Brain dispatcher and requires the appropriate API key in \`.env\`. The slash command (this one) intentionally bypasses external APIs to keep host-CLI usage zero-config.
|
|
133
279
|
`;
|
|
134
280
|
}
|
|
135
281
|
|
|
@@ -148,7 +294,9 @@ allowed-tools:
|
|
|
148
294
|
- AskUserQuestion
|
|
149
295
|
---
|
|
150
296
|
|
|
151
|
-
|
|
297
|
+
**Mode:** host-native — you (the host LLM) become **${capitalize(agent.id)}** for this conversation.
|
|
298
|
+
|
|
299
|
+
Activation:
|
|
152
300
|
|
|
153
301
|
1. Read \`.openlife/method/agents/${agent.id}.md\` in full.
|
|
154
302
|
2. Adopt the persona and execute the activation flow defined there:
|
|
@@ -158,6 +306,8 @@ Activate **${capitalize(agent.id)}** from the OpenLife method.
|
|
|
158
306
|
3. If \`$ARGUMENTS\` is non-empty, treat it as an initial task or context for the persona.
|
|
159
307
|
|
|
160
308
|
After the user's first \`*command\`, follow the persona's hand-off rules to suggest the next persona when appropriate.
|
|
309
|
+
|
|
310
|
+
This activation does NOT use any external model — you ARE the agent. The OpenLife Brain (external model chain) is reserved for headless / CI usage via \`openlife ask\` in a terminal.
|
|
161
311
|
`;
|
|
162
312
|
}
|
|
163
313
|
|
|
@@ -175,14 +325,32 @@ allowed-tools:
|
|
|
175
325
|
- AskUserQuestion
|
|
176
326
|
---
|
|
177
327
|
|
|
178
|
-
|
|
328
|
+
**Mode:** host-native — you (the host LLM) orchestrate the \`${wfId}\` workflow yourself, playing the personas as needed.
|
|
329
|
+
|
|
330
|
+
### Step 1 — Load the workflow definition
|
|
331
|
+
|
|
332
|
+
Read \`dist-templates/workflows/${wfId}.yaml\` (project local override at \`.openlife/method/workflows/${wfId}.yaml\` or \`.catalog/workflows/${wfId}.yaml\` takes precedence if present).
|
|
333
|
+
|
|
334
|
+
If \`$ARGUMENTS\` contains \`--dry-run\`, ALSO shell out to \`openlife flow run ${wfId} --dry-run\` to print the phase plan, then STOP.
|
|
335
|
+
|
|
336
|
+
### Step 2 — Walk the phases
|
|
337
|
+
|
|
338
|
+
For each phase in the workflow's \`sequence\`:
|
|
339
|
+
|
|
340
|
+
1. Announce which phase you're entering and which persona owns this phase (the \`agent:\` field on the step)
|
|
341
|
+
2. Read \`.openlife/method/agents/<persona-id>.md\` for the active persona — adopt that persona for this phase
|
|
342
|
+
3. Execute the step's \`action\` using the persona's discipline (commands, hand-off rules, anti-patterns)
|
|
343
|
+
4. Produce the artifacts listed in \`creates:\` — write them to the paths declared in the YAML
|
|
344
|
+
5. If \`elicit: true\`, ask the user via AskUserQuestion before proceeding
|
|
345
|
+
6. Hand off to the next phase's persona; announce the handoff
|
|
346
|
+
|
|
347
|
+
### Step 3 — Surface failures explicitly
|
|
348
|
+
|
|
349
|
+
On any step failure: identify the failing step, the active persona, and offer to escalate to \`@openlife-maestro\` (read \`.openlife/method/agents/maestro.md\`).
|
|
179
350
|
|
|
180
|
-
|
|
181
|
-
- Each phase invokes one or more OpenLife method agents.
|
|
182
|
-
- On any failure: surface the failing step + which agent is responsible, then offer to escalate to \`@openlife-maestro\`.
|
|
183
|
-
- \`--dry-run\` prints the phase plan without executing.
|
|
351
|
+
### Why host-native, not shell?
|
|
184
352
|
|
|
185
|
-
|
|
353
|
+
Running the workflow this way uses your reasoning (the host LLM) instead of the external Brain chain. Zero API key needed for orchestration. If the user wants the external Brain to drive (headless / batch / cron), they can run \`openlife flow run ${wfId} "$ARGUMENTS"\` in a terminal.
|
|
186
354
|
`;
|
|
187
355
|
}
|
|
188
356
|
|
|
@@ -193,6 +361,8 @@ function capitalize(s) {
|
|
|
193
361
|
// ─── Emit ───────────────────────────────────────────────────────────────
|
|
194
362
|
|
|
195
363
|
let total = 0;
|
|
364
|
+
let hostNative = 0;
|
|
365
|
+
let runtime = 0;
|
|
196
366
|
|
|
197
367
|
for (const host of HOSTS) {
|
|
198
368
|
const baseDir = path.join(REPO_ROOT, 'dist-templates', host, 'commands', 'openlife');
|
|
@@ -203,18 +373,23 @@ for (const host of HOSTS) {
|
|
|
203
373
|
const fp = path.join(baseDir, `${cmd.name}.md`);
|
|
204
374
|
fs.writeFileSync(fp, renderTopLevel(cmd));
|
|
205
375
|
total++;
|
|
376
|
+
if (cmd.mode === 'host-native') hostNative++;
|
|
377
|
+
else if (cmd.mode === 'runtime') runtime++;
|
|
206
378
|
}
|
|
207
379
|
for (const agent of AGENTS) {
|
|
208
380
|
const fp = path.join(baseDir, 'agents', `${agent.id}.md`);
|
|
209
381
|
fs.writeFileSync(fp, renderAgent(agent));
|
|
210
382
|
total++;
|
|
383
|
+
hostNative++;
|
|
211
384
|
}
|
|
212
385
|
for (const flow of FLOWS) {
|
|
213
386
|
const fp = path.join(baseDir, 'flow', `${flow.id}.md`);
|
|
214
387
|
fs.writeFileSync(fp, renderFlow(flow));
|
|
215
388
|
total++;
|
|
389
|
+
hostNative++;
|
|
216
390
|
}
|
|
217
391
|
}
|
|
218
392
|
|
|
219
393
|
console.log(`[generate-slash-commands] wrote ${total} files across ${HOSTS.length} hosts.`);
|
|
220
394
|
console.log(`Breakdown per host: ${TOP_LEVEL.length} top-level + ${AGENTS.length} agents + ${FLOWS.length} flows = ${TOP_LEVEL.length + AGENTS.length + FLOWS.length}`);
|
|
395
|
+
console.log(`Mode split: ${hostNative} host-native + ${runtime} runtime-state (× ${HOSTS.length} hosts)`);
|