@ritualai/cli 0.7.15 → 0.8.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 (42) hide show
  1. package/dist/commands/doctor.js +66 -0
  2. package/dist/commands/doctor.js.map +1 -1
  3. package/dist/commands/init.js +468 -108
  4. package/dist/commands/init.js.map +1 -1
  5. package/dist/index.js +3 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/agents/providers.js +33 -5
  8. package/dist/lib/agents/providers.js.map +1 -1
  9. package/dist/lib/build-flow-explainer.js +226 -0
  10. package/dist/lib/build-flow-explainer.js.map +1 -0
  11. package/dist/lib/final-cta-box.js +224 -0
  12. package/dist/lib/final-cta-box.js.map +1 -0
  13. package/dist/lib/gitignore-update.js +13 -4
  14. package/dist/lib/gitignore-update.js.map +1 -1
  15. package/dist/lib/onboarding-state.js +140 -0
  16. package/dist/lib/onboarding-state.js.map +1 -0
  17. package/dist/lib/persona-picker.js +171 -0
  18. package/dist/lib/persona-picker.js.map +1 -0
  19. package/dist/lib/persona-samples.js +245 -0
  20. package/dist/lib/persona-samples.js.map +1 -0
  21. package/dist/lib/project-config.js.map +1 -1
  22. package/dist/lib/skill-bundles.js +4 -0
  23. package/dist/lib/skill-bundles.js.map +1 -1
  24. package/dist/lib/skill-copy.js +62 -10
  25. package/dist/lib/skill-copy.js.map +1 -1
  26. package/dist/lib/workspace-explainer.js +193 -0
  27. package/dist/lib/workspace-explainer.js.map +1 -0
  28. package/dist/lib/workspace-flow.js +8 -7
  29. package/dist/lib/workspace-flow.js.map +1 -1
  30. package/package.json +73 -73
  31. package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
  32. package/skills/claude-code/ritual/references/build-flow.md +51 -14
  33. package/skills/codex/ritual/.ritual-bundle.json +2 -2
  34. package/skills/codex/ritual/references/build-flow.md +51 -14
  35. package/skills/cursor/ritual/.ritual-bundle.json +2 -2
  36. package/skills/cursor/ritual/references/build-flow.md +51 -14
  37. package/skills/gemini/ritual/.ritual-bundle.json +2 -2
  38. package/skills/gemini/ritual/references/build-flow.md +51 -14
  39. package/skills/kiro/ritual/.ritual-bundle.json +2 -2
  40. package/skills/kiro/ritual/references/build-flow.md +51 -14
  41. package/skills/vscode/ritual/.ritual-bundle.json +2 -2
  42. package/skills/vscode/ritual/references/build-flow.md +51 -14
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ /**
3
+ * Static lookup table: persona slug → presentation data for the
4
+ * onboarding screens.
5
+ *
6
+ * Each entry carries the data the CLI needs to render the persona
7
+ * picker, the workspace-explainer card, and the build-flow handover
8
+ * box without a network call. Two pieces of justification:
9
+ *
10
+ * 1. The persona-pick step happens at `ritual init` time, before
11
+ * the workspace exists and before the user has approved any
12
+ * API calls. We want the picker to feel instant — no spinner
13
+ * while we hit `/templates`.
14
+ *
15
+ * 2. The discipline framing + sample exploration names are
16
+ * curation, not data the API has today. Keeping the curation
17
+ * CLI-side is fine: the underlying template (id matches the
18
+ * `slug` here) is what gets used downstream; this file is
19
+ * presentation polish.
20
+ *
21
+ * When a new Engineering template ships in
22
+ * `apps/api/scripts/templates/`, add a matching entry here. Persona
23
+ * slug MUST equal the template's `schema.id` (the JSON file's `id`
24
+ * field) — that's how `/ritual build` looks up the right default
25
+ * template at build time.
26
+ *
27
+ * Maintenance shape: this is ~12 entries × ~10 fields = a couple
28
+ * hundred lines, churns only when the Engineering template family
29
+ * grows. The seed pipeline doesn't read this file; this is
30
+ * CLI-render-time data only.
31
+ */
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.FEATURED_PERSONA_SLUGS = exports.GENERIC_PERSONA = exports.PERSONA_SAMPLES = void 0;
34
+ exports.findPersona = findPersona;
35
+ const colors_1 = require("./colors");
36
+ // Accents chosen to be visually distinct under 16-color and 256-color
37
+ // terminals as well as truecolor. Keep each persona in a different
38
+ // hue family so adjacent cards in the picker don't blend.
39
+ const ACCENT = {
40
+ teal: colors_1.RITUAL_TEAL,
41
+ blue: [0x4f, 0x9a, 0xff],
42
+ violet: [0x9b, 0x6f, 0xff],
43
+ magenta: [0xd8, 0x5f, 0xc0],
44
+ red: [0xe0, 0x5f, 0x5f],
45
+ amber: [0xe0, 0xa8, 0x4f],
46
+ green: [0x60, 0xc7, 0x70],
47
+ cyan: [0x5f, 0xc7, 0xc7],
48
+ };
49
+ exports.PERSONA_SAMPLES = [
50
+ {
51
+ slug: 'backend-services',
52
+ label: 'Backend Services',
53
+ shortLabel: 'Backend',
54
+ framing: 'backend services — APIs, workers, contracts, persistence',
55
+ sampleExplorations: [
56
+ 'Add rate limit to /orders',
57
+ 'Make Idempotency-Key required for POSTs',
58
+ 'Split monolithic /search into focused services',
59
+ ],
60
+ accent: ACCENT.teal,
61
+ caresAbout: ['APIs', 'workers', 'transactions', 'idempotency', 'tracing'],
62
+ },
63
+ {
64
+ slug: 'frontend-web',
65
+ label: 'Frontend Web',
66
+ shortLabel: 'Frontend',
67
+ framing: 'frontend web — components, state, perf, accessibility',
68
+ sampleExplorations: [
69
+ 'Improve checkout LCP',
70
+ 'Add empty state to settings page',
71
+ 'Fix keyboard nav on /admin tabs',
72
+ ],
73
+ accent: ACCENT.cyan,
74
+ caresAbout: ['components', 'state', 'routing', 'a11y', 'RUM', 'bundle'],
75
+ },
76
+ {
77
+ slug: 'data-engineering',
78
+ label: 'Data Engineering',
79
+ shortLabel: 'Data',
80
+ framing: 'data engineering — pipelines, schemas, lineage, SLAs',
81
+ sampleExplorations: [
82
+ 'Add CDC for orders → fact_revenue',
83
+ 'Handle late-arriving events in user_sessions',
84
+ 'Deprecate fact_v1; cut consumers to fact_v2',
85
+ ],
86
+ accent: ACCENT.blue,
87
+ caresAbout: ['ETL/ELT', 'schemas', 'lineage', 'freshness', 'backfills'],
88
+ },
89
+ {
90
+ slug: 'ml-engineering',
91
+ label: 'ML Engineering',
92
+ shortLabel: 'ML',
93
+ framing: 'ML engineering — datasets, training, eval, serving, drift',
94
+ sampleExplorations: [
95
+ 'Experiment: new ranking model v4 vs v3',
96
+ 'Add online drift detection for recs',
97
+ 'Retraining cadence for fraud classifier',
98
+ ],
99
+ accent: ACCENT.violet,
100
+ caresAbout: ['datasets', 'features', 'evals', 'serving', 'drift'],
101
+ },
102
+ {
103
+ slug: 'platform-engineering',
104
+ label: 'Platform Engineering',
105
+ shortLabel: 'Platform',
106
+ framing: 'platform — IaC, CI/CD, SLOs, observability, on-call',
107
+ sampleExplorations: [
108
+ 'Set up SLO for /api endpoints (99.9%)',
109
+ 'Add per-tenant rate limiting',
110
+ 'Ephemeral preview env per PR',
111
+ ],
112
+ accent: ACCENT.green,
113
+ caresAbout: ['IaC', 'CI/CD', 'SLOs', 'rollouts', 'observability'],
114
+ },
115
+ {
116
+ slug: 'security-engineering',
117
+ label: 'Security Engineering',
118
+ shortLabel: 'Security',
119
+ framing: 'security — threat models, controls, audit, supply chain',
120
+ sampleExplorations: [
121
+ 'Threat model for /webhooks endpoint',
122
+ 'Audit log retention for compliance',
123
+ 'Rotate JWT signing keys quarterly',
124
+ ],
125
+ accent: ACCENT.red,
126
+ caresAbout: ['threats', 'authN/Z', 'secrets', 'SAST/DAST', 'audit'],
127
+ },
128
+ {
129
+ slug: 'developer-tooling',
130
+ label: 'Developer Tooling',
131
+ shortLabel: 'DevTools',
132
+ framing: 'developer tooling — CLIs, MCPs, structured I/O, distribution',
133
+ sampleExplorations: [
134
+ 'Add --json output to ritual init',
135
+ 'MCP tool: generate eval report',
136
+ 'Skill: lint imports in PR diffs',
137
+ ],
138
+ accent: ACCENT.amber,
139
+ caresAbout: ['CLI UX', 'exit codes', 'JSON output', 'versioning', 'DX'],
140
+ },
141
+ {
142
+ slug: 'embedded-firmware',
143
+ label: 'Embedded / Firmware',
144
+ shortLabel: 'Embedded',
145
+ framing: 'embedded — MCU, RTOS, memory, peripherals, boot, OTA',
146
+ sampleExplorations: [
147
+ 'OTA rollback safety check',
148
+ 'Watchdog timeout for sensor task',
149
+ 'Power budget for BLE advertising',
150
+ ],
151
+ accent: ACCENT.green,
152
+ caresAbout: ['MCU', 'RTOS', 'memory', 'peripherals', 'OTA', 'power'],
153
+ },
154
+ {
155
+ slug: 'game-development',
156
+ label: 'Game Development',
157
+ shortLabel: 'Game Dev',
158
+ framing: 'game dev — engines, scenes, frame budget, assets',
159
+ sampleExplorations: [
160
+ 'Weapon-charging mechanic in L1',
161
+ 'Asset streaming for level 3',
162
+ 'Frame budget for new VFX system',
163
+ ],
164
+ accent: ACCENT.magenta,
165
+ caresAbout: ['engine', 'scenes', 'FPS', 'shaders', 'assets'],
166
+ },
167
+ {
168
+ slug: 'smart-contracts',
169
+ label: 'Smart Contracts',
170
+ shortLabel: 'Contracts',
171
+ framing: 'smart contracts — on-chain, gas, invariants, audits',
172
+ sampleExplorations: [
173
+ 'Upgrade authority multisig (4-of-7)',
174
+ 'Gas optimization for batch deposits',
175
+ 'Invariant: totalSupply == sum(balances)',
176
+ ],
177
+ accent: ACCENT.amber,
178
+ caresAbout: ['state', 'gas', 'invariants', 'oracles', 'audits'],
179
+ },
180
+ {
181
+ slug: 'desktop-apps',
182
+ label: 'Desktop Apps',
183
+ shortLabel: 'Desktop',
184
+ framing: 'desktop apps — OS APIs, installers, signing, auto-update',
185
+ sampleExplorations: [
186
+ 'Auto-update rollback on first-launch crash',
187
+ 'macOS notarization in CI',
188
+ 'Menu bar app + Windows tray parity',
189
+ ],
190
+ accent: ACCENT.cyan,
191
+ caresAbout: ['OS APIs', 'installers', 'signing', 'updates', 'crashes'],
192
+ },
193
+ {
194
+ slug: 'qa-engineering',
195
+ label: 'QA Engineering',
196
+ shortLabel: 'QA',
197
+ framing: 'QA — test strategy, harness, flake mgmt, release gates',
198
+ sampleExplorations: [
199
+ 'Contract tests between web ↔ api',
200
+ 'Flake quarantine policy + SLA',
201
+ 'Release-blocking gate definition',
202
+ ],
203
+ accent: ACCENT.blue,
204
+ caresAbout: ['test pyramid', 'harnesses', 'flakes', 'contracts', 'CI cost'],
205
+ },
206
+ ];
207
+ /** Look up a persona by slug. Returns null for unknown slugs. */
208
+ function findPersona(slug) {
209
+ if (!slug)
210
+ return null;
211
+ return exports.PERSONA_SAMPLES.find((p) => p.slug === slug) ?? null;
212
+ }
213
+ /**
214
+ * Generic fallback persona used when the user has skipped the picker
215
+ * (e.g. `--persona none` or non-TTY automation). Lets the workspace
216
+ * explainer + build-flow explainer still render with sensible
217
+ * defaults instead of crashing on null.
218
+ */
219
+ exports.GENERIC_PERSONA = {
220
+ slug: 'backend-services', // safe default; never persisted unless picked
221
+ label: 'Software Engineer',
222
+ shortLabel: 'Engineer',
223
+ framing: 'software — features, refactors, investigations',
224
+ sampleExplorations: [
225
+ 'New feature from a brief',
226
+ 'Refactor existing code',
227
+ 'Investigation before coding',
228
+ ],
229
+ accent: colors_1.RITUAL_TEAL,
230
+ caresAbout: ['features', 'tests', 'rollout', 'review'],
231
+ };
232
+ /**
233
+ * The 5 personas surfaced first in the picker — by rough community
234
+ * frequency. The rest are revealed via "see more." Order tuned for
235
+ * the most common backend/frontend/data starting points, with
236
+ * platform + ML following.
237
+ */
238
+ exports.FEATURED_PERSONA_SLUGS = [
239
+ 'backend-services',
240
+ 'frontend-web',
241
+ 'data-engineering',
242
+ 'ml-engineering',
243
+ 'platform-engineering',
244
+ ];
245
+ //# sourceMappingURL=persona-samples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persona-samples.js","sourceRoot":"","sources":["../../src/lib/persona-samples.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AAuNH,kCAGC;AAxND,qCAAuC;AAuCvC,sEAAsE;AACtE,mEAAmE;AACnE,0DAA0D;AAC1D,MAAM,MAAM,GAAG;IACd,IAAI,EAAE,oBAAW;IACjB,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAA6B;IACpD,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAA6B;IACtD,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI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AAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC"}
@@ -20,6 +20,10 @@ const skill_manifest_1 = require("./skill-manifest");
20
20
  function findLocalSkillBundles(projectDir, cliVersion) {
21
21
  const found = [];
22
22
  for (const provider of providers_1.PROVIDERS) {
23
+ // MCP-only agents (no projectSkillDir, e.g. Windsurf as of 0.7.16)
24
+ // have nothing on disk to walk — skip silently.
25
+ if (!provider.projectSkillDir)
26
+ continue;
23
27
  const skillRoot = (0, node_path_1.join)(projectDir, provider.projectSkillDir);
24
28
  if (!(0, node_fs_1.existsSync)(skillRoot))
25
29
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-bundles.js","sourceRoot":"","sources":["../../src/lib/skill-bundles.ts"],"names":[],"mappings":";;AAqCA,sDAgCC;AAQD,4CAEC;AA/ED,qCAA4D;AAC5D,yCAAiC;AACjC,kDAAmE;AACnE,qDAA4F;AAuB5F;;;;;;;;;;GAUG;AACH,SAAgB,qBAAqB,CAAC,UAAkB,EAAE,UAAkB;IAC3E,MAAM,KAAK,GAAuB,EAAE,CAAC;IAErC,KAAK,MAAM,QAAQ,IAAI,qBAAS,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,IAAA,gBAAI,EAAC,UAAU,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAA,oBAAU,EAAC,SAAS,CAAC;YAAE,SAAS;QAErC,IAAI,OAAiB,CAAC;QACtB,IAAI,CAAC;YACJ,OAAO,GAAG,IAAA,qBAAW,EAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;iBACvD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;iBACzD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI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AKG;AACH,SAAgB,gBAAgB,CAAC,OAA2B;IAC3D,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AACtF,CAAC"}
@@ -18,18 +18,31 @@ function getPackageRoot() {
18
18
  return (0, node_path_1.resolve)(__dirname, '..', '..');
19
19
  }
20
20
  /**
21
- * Copy every skill bundled for `provider` into the project.
21
+ * Copy every skill bundled for `provider` into the user's project
22
+ * AND (when supported) into the user-global skills dir.
22
23
  *
23
24
  * `projectDir` is usually `process.cwd()` but parameterized so tests
24
25
  * can write to a temp directory.
25
26
  */
26
27
  function copySkillsForProvider(provider, projectDir, packageRoot = getPackageRoot()) {
28
+ // MCP-only agents (currently Windsurf) have no skill destinations.
29
+ // Return an empty result so the caller treats them as "scaffolded
30
+ // nothing" without erroring.
31
+ if (!provider.projectSkillDir || !provider.packageSkillDir) {
32
+ return {
33
+ provider,
34
+ copied: 0,
35
+ reason: 'agent has no skill-install convention (MCP-only)',
36
+ scopes: [],
37
+ };
38
+ }
27
39
  const sourceBase = (0, node_path_1.join)(packageRoot, provider.packageSkillDir);
28
40
  if (!(0, node_fs_1.existsSync)(sourceBase)) {
29
41
  return {
30
42
  provider,
31
43
  copied: 0,
32
44
  reason: `package missing ${provider.packageSkillDir}/ — try reinstalling @ritualai/cli`,
45
+ scopes: [],
33
46
  };
34
47
  }
35
48
  const skillDirs = (0, node_fs_1.readdirSync)(sourceBase, { withFileTypes: true })
@@ -40,18 +53,57 @@ function copySkillsForProvider(provider, projectDir, packageRoot = getPackageRoo
40
53
  provider,
41
54
  copied: 0,
42
55
  reason: 'no skills found in package bundle',
56
+ scopes: [],
43
57
  };
44
58
  }
45
- const targetBase = (0, node_path_1.join)(projectDir, provider.projectSkillDir);
46
- for (const name of skillDirs) {
59
+ // Project-local copy: always attempted.
60
+ const projectResult = copyAllToDestination('project', (0, node_path_1.join)(projectDir, provider.projectSkillDir), sourceBase, skillDirs);
61
+ // User-global copy: only when the provider declares a userSkillDir.
62
+ // Agents like Cursor (settings-DB-only) and Windsurf (MCP-only)
63
+ // omit this; doctor surfaces the asymmetry for users who care.
64
+ const scopes = [projectResult];
65
+ if (provider.userSkillDir) {
66
+ scopes.push(copyAllToDestination('user-global', provider.userSkillDir, sourceBase, skillDirs));
67
+ }
68
+ const totalCopied = scopes.reduce((sum, s) => sum + s.copied, 0);
69
+ const failures = scopes.filter((s) => s.reason).map((s) => `${s.scope}: ${s.reason}`);
70
+ return {
71
+ provider,
72
+ copied: totalCopied,
73
+ reason: failures.length > 0 ? failures.join('; ') : undefined,
74
+ scopes,
75
+ };
76
+ }
77
+ /**
78
+ * Copy every `skillName` from `sourceBase/<name>/` to
79
+ * `destinationBase/<name>/`. Returns a CopyScopeResult — success
80
+ * counts skills that landed, failures populate `reason`. Permission /
81
+ * filesystem errors are caught so a single bad agent doesn't abort
82
+ * the whole `ritual init` run.
83
+ */
84
+ function copyAllToDestination(scope, destinationBase, sourceBase, skillNames) {
85
+ let copied = 0;
86
+ let lastError;
87
+ for (const name of skillNames) {
47
88
  const src = (0, node_path_1.join)(sourceBase, name);
48
- const dest = (0, node_path_1.join)(targetBase, name);
49
- (0, node_fs_1.mkdirSync)(dest, { recursive: true });
50
- // `force: true` overwrites; `recursive: true` walks the whole
51
- // skill directory (covers SKILL.md + any sibling assets like
52
- // nested examples/ or templates/).
53
- (0, node_fs_1.cpSync)(src, dest, { recursive: true, force: true });
89
+ const dest = (0, node_path_1.join)(destinationBase, name);
90
+ try {
91
+ (0, node_fs_1.mkdirSync)(dest, { recursive: true });
92
+ // `force: true` overwrites; `recursive: true` walks the whole
93
+ // skill directory (covers SKILL.md + any sibling assets like
94
+ // nested examples/ or templates/).
95
+ (0, node_fs_1.cpSync)(src, dest, { recursive: true, force: true });
96
+ copied++;
97
+ }
98
+ catch (err) {
99
+ lastError = `${name}: ${err.message}`;
100
+ }
54
101
  }
55
- return { provider, copied: skillDirs.length };
102
+ return {
103
+ scope,
104
+ destination: destinationBase,
105
+ copied,
106
+ reason: copied < skillNames.length ? lastError ?? 'partial copy' : undefined,
107
+ };
56
108
  }
57
109
  //# sourceMappingURL=skill-copy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-copy.js","sourceRoot":"","sources":["../../src/lib/skill-copy.ts"],"names":[],"mappings":";;AA0CA,wCAEC;AAQD,sDAwCC;AA5FD,qCAAqE;AACrE,yCAA0C;AA+B1C;;;;;;;;;GASG;AACH,SAAgB,cAAc;IAC7B,OAAO,IAAA,mBAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACpC,QAAuB,EACvB,UAAkB,EAClB,cAAsB,cAAc,EAAE;IAEtC,MAAM,UAAU,GAAG,IAAA,gBAAI,EAAC,WAAW,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAE/D,IAAI,CAAC,IAAA,oBAAU,EAAC,UAAU,CAAC,EAAE,CAAC;QAC7B,OAAO;YACN,QAAQ;YACR,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,mBAAmB,QAAQ,CAAC,eAAe,oCAAoC;SACvF,CAAC;IACH,CAAC;IAED,MAAM,SAAS,GAAG,IAAA,qBAAW,EAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;SAChE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SAC9B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAErB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;YACN,QAAQ;YACR,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,mCAAmC;SAC3C,CAAC;IACH,CAAC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OAAO;QACN,KAAK;QACL,WAAW,EAAE,eAAe;QAC5B,MAAM;QACN,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,cAAc,CAAC,CAAC,CAAC,SAAS;KAC5E,CAAC;AACH,CAAC"}
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ /**
3
+ * Workspace explainer — onboarding screen #2 of 3.
4
+ *
5
+ * Shown once per machine on first `ritual init` (gated by
6
+ * onboarding-state.ts). Teaches the user the mental model:
7
+ *
8
+ * - Workspace = container for explorations on this codebase
9
+ * - Explorations = boxes of work (problem → answers → recs → brief → impl)
10
+ * - Context flows between explorations within a workspace
11
+ * (decisions, anti-goals, file lineage carry forward)
12
+ *
13
+ * Personalized via:
14
+ * - Workspace name (git-remote-detected, falls back to cwd basename)
15
+ * - Persona slug (when set) → discipline framing + 3 sample
16
+ * exploration names from persona-samples.ts
17
+ *
18
+ * Non-TTY fallback: terse 3-line summary printed via printTerse().
19
+ * Caller is expected to check tty + onboarding state before calling
20
+ * the rich version.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.detectColorMode = void 0;
24
+ exports.printWorkspaceExplainer = printWorkspaceExplainer;
25
+ exports.printWorkspaceExplainerTerse = printWorkspaceExplainerTerse;
26
+ const colors_1 = require("./colors");
27
+ Object.defineProperty(exports, "detectColorMode", { enumerable: true, get: function () { return colors_1.detectColorMode; } });
28
+ const persona_samples_1 = require("./persona-samples");
29
+ /** Width target. Matches welcome-banner.ts for visual consistency. */
30
+ const BOX_WIDTH = 78;
31
+ /**
32
+ * Render the workspace explainer to stdout. Always renders (caller
33
+ * decides whether to skip based on TTY + onboarding-state).
34
+ *
35
+ * The rich version assumes ≥80-char terminal width. For narrower
36
+ * terminals, callers should prefer printTerse().
37
+ */
38
+ function printWorkspaceExplainer(opts) {
39
+ const persona = (0, persona_samples_1.findPersona)(opts.personaSlug) ?? persona_samples_1.GENERIC_PERSONA;
40
+ const accent = persona.accent;
41
+ const lines = [];
42
+ // Title bar carries the workspace name + brand-teal accent. The
43
+ // body BELOW it actually teaches what a workspace IS (replaces an
44
+ // earlier draft that just labeled "workspace: foo / you build: bar"
45
+ // without explaining the concept — the visual cards alone weren't
46
+ // enough to land it).
47
+ lines.push(box.top(BOX_WIDTH, (0, colors_1.color)(accent, `─ workspace: "${opts.workspaceName}" `)));
48
+ lines.push(box.padded(BOX_WIDTH, ''));
49
+ // Value-prop framing — mirrors the developer landing page at
50
+ // ritual.work/product/developer ("structured discovery, living
51
+ // specs, plans with less guesswork — so AI agents land changes
52
+ // you'd actually merge"). One bold opener + two dim continuation
53
+ // lines so the eye lands on the verb-noun phrases without the
54
+ // outcome clause getting lost in the wrap.
55
+ lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'where structured discovery, living specs, and plans with')}`));
56
+ lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'less guesswork come together —')}`));
57
+ lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('so AI agents land changes you\'d actually merge.')}`));
58
+ lines.push(box.padded(BOX_WIDTH, ''));
59
+ // Inner container with 3 exploration cards side-by-side
60
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('┌' + '─'.repeat(BOX_WIDTH - 8) + '┐')));
61
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│') + ' '.repeat(BOX_WIDTH - 8) + (0, colors_1.dim)('│')));
62
+ const cards = renderExplorationCardsRow(persona);
63
+ for (const cardLine of cards) {
64
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│ ') + cardLine + (0, colors_1.dim)(' │')));
65
+ }
66
+ // Down-arrows pointing to shared context
67
+ const arrowsLine = ' ↓ ↓ ↓';
68
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│ ') + (0, colors_1.dim)(arrowsLine.padEnd(BOX_WIDTH - 16)) + (0, colors_1.dim)('│')));
69
+ // Shared context strip
70
+ const contextLines = [
71
+ ' ┌─ shared context · knowledge graph ' + '─'.repeat(28) + '┐',
72
+ ' │ • decisions in one carry to the next' + ' '.repeat(28) + '│',
73
+ ' │ • anti-goals propagate forward' + ' '.repeat(34) + '│',
74
+ ' │ • file lineage: which exploration shaped this' + ' '.repeat(19) + '│',
75
+ ' │ • prior implementations inform new explorations' + ' '.repeat(17) + '│',
76
+ ' └' + '─'.repeat(65) + '┘',
77
+ ];
78
+ for (const cl of contextLines) {
79
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│ ') + (0, colors_1.color)(accent, cl) + (0, colors_1.dim)(' │')));
80
+ }
81
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│') + ' '.repeat(BOX_WIDTH - 8) + (0, colors_1.dim)('│')));
82
+ lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('└' + '─'.repeat(BOX_WIDTH - 8) + '┘')));
83
+ lines.push(box.padded(BOX_WIDTH, ''));
84
+ // What you'll do here. Kept short: only commands that exist + are
85
+ // expected to be the first thing the user reaches for. `/ritual
86
+ // lineage` lived here in the first draft; pulled because it's not
87
+ // shipping in the same window as this onboarding flow and we
88
+ // don't want to teach a command that doesn't work yet.
89
+ lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'what you\'ll do here:')}`));
90
+ lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('›')} /ritual build <feature> ${(0, colors_1.dim)('create an exploration')}`));
91
+ lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('›')} /ritual resume ${(0, colors_1.dim)('pick up where you left off')}`));
92
+ lines.push(box.padded(BOX_WIDTH, ''));
93
+ lines.push(box.bottom(BOX_WIDTH));
94
+ for (const line of lines) {
95
+ process.stdout.write(line + '\n');
96
+ }
97
+ }
98
+ /**
99
+ * Terse single-line-per-concept fallback for non-TTY or narrow
100
+ * terminals. No colors, no boxes — just the teaching.
101
+ */
102
+ function printWorkspaceExplainerTerse(opts) {
103
+ // `persona` is intentionally not consulted in the terse path —
104
+ // the framing line was pulled in favor of an actual definition.
105
+ // Persona-specific examples still surface in the rich version.
106
+ void (0, persona_samples_1.findPersona)(opts.personaSlug);
107
+ process.stdout.write(`\n workspace: "${opts.workspaceName}"\n`);
108
+ process.stdout.write('\n');
109
+ process.stdout.write(' Where structured discovery, living specs, and plans with less\n');
110
+ process.stdout.write(' guesswork come together — so AI agents land changes you\'d\n');
111
+ process.stdout.write(' actually merge.\n');
112
+ process.stdout.write('\n');
113
+ process.stdout.write(' Use /ritual build <feature> to create an exploration. /ritual resume\n');
114
+ process.stdout.write(' to pick up where you left off.\n');
115
+ process.stdout.write('\n');
116
+ }
117
+ // ─── helpers ────────────────────────────────────────────────────────────────
118
+ /**
119
+ * Render the 3 exploration cards as a single 4-line column-block:
120
+ * top border with the "exploration" label, two title lines (most
121
+ * titles wrap to 2; short ones get a blank second line), bottom
122
+ * border. Lifecycle bullets used to live here; they were dropped
123
+ * because they teach the SAME thing as the build-flow explainer's
124
+ * phase chain (which is the right place for that detail). The
125
+ * workspace explainer should only convey the unit + that multiple
126
+ * units coexist in a workspace.
127
+ *
128
+ * Each card is 18 visible chars wide (`┌─ exploration ──┐`); 3 cards
129
+ * + 2 separators (2 spaces each) = 18*3 + 4 = 58 chars, well within
130
+ * the BOX_WIDTH - 8 = 70 inner budget.
131
+ */
132
+ function renderExplorationCardsRow(persona) {
133
+ const titles = persona.sampleExplorations;
134
+ // Card body width (inside the side `│ … │` chars). Matches the
135
+ // width of the top/bottom borders so all three rows align cleanly.
136
+ const bodyW = 14;
137
+ // Wrap each title to 2 lines; pad the second line with empty so
138
+ // short titles still occupy the full card height.
139
+ const wrap = (s) => {
140
+ if (s.length <= bodyW)
141
+ return [s, ''];
142
+ const cut = s.slice(0, bodyW).lastIndexOf(' ');
143
+ if (cut <= 0)
144
+ return [s.slice(0, bodyW), s.slice(bodyW, 2 * bodyW)];
145
+ return [s.slice(0, cut), s.slice(cut + 1, cut + 1 + bodyW)];
146
+ };
147
+ const wrapped = titles.map(wrap);
148
+ const pad = (s) => s.padEnd(bodyW, ' ');
149
+ const top = '┌─ exploration ──┐';
150
+ const mid = '│';
151
+ const bot = '└────────────────┘';
152
+ const lines = [];
153
+ // Top border × 3
154
+ lines.push([top, top, top].join(' '));
155
+ // Title line 1 × 3
156
+ lines.push([wrapped[0][0], wrapped[1][0], wrapped[2][0]]
157
+ .map((t) => `${mid} ${pad(t)} ${mid}`)
158
+ .join(' '));
159
+ // Title line 2 × 3 (blank for short titles)
160
+ lines.push([wrapped[0][1], wrapped[1][1], wrapped[2][1]]
161
+ .map((t) => `${mid} ${pad(t)} ${mid}`)
162
+ .join(' '));
163
+ // Bottom border × 3
164
+ lines.push([bot, bot, bot].join(' '));
165
+ return lines;
166
+ }
167
+ /**
168
+ * Minimal box-drawing helpers. Local to this module to keep the
169
+ * file self-contained; if the workspace + build-flow explainers
170
+ * grow more shared box logic we can factor into a `box.ts`.
171
+ */
172
+ const box = {
173
+ top(width, title) {
174
+ // Title sits at column 2, padded with ─ to fill width.
175
+ const stripped = stripAnsi(title);
176
+ const fillWidth = width - stripped.length - 4;
177
+ return `╭ ${title} ${'─'.repeat(Math.max(0, fillWidth))}╮`;
178
+ },
179
+ bottom(width) {
180
+ return '╰' + '─'.repeat(width - 2) + '╯';
181
+ },
182
+ padded(width, content) {
183
+ const stripped = stripAnsi(content);
184
+ const pad = ' '.repeat(Math.max(0, width - 2 - stripped.length));
185
+ return `│${content}${pad}│`;
186
+ },
187
+ };
188
+ /** Strip ANSI escape sequences so padding math is correct. */
189
+ function stripAnsi(s) {
190
+ // eslint-disable-next-line no-control-regex
191
+ return s.replace(/\x1b\[[0-9;]*m/g, '');
192
+ }
193
+ //# sourceMappingURL=workspace-explainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-explainer.js","sourceRoot":"","sources":["../../src/lib/workspace-expl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,CAAC,KAAa,EAAE,KAAa;QAC/B,uDAAuD;QACvD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9C,OAAO,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC;IAC5D,CAAC;IACD,MAAM,CAAC,KAAa;QACnB,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAC1C,CAAC;IACD,MAAM,CAAC,KAAa,EAAE,OAAe;QACpC,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACjE,OAAO,IAAI,OAAO,GAAG,GAAG,GAAG,CAAC;IAC7B,CAAC;CACD,CAAC;AAEF,8DAA8D;AAC9D,SAAS,SAAS,CAAC,CAAS;IAC3B,4CAA4C;IAC5C,OAAO,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC"}
@@ -21,13 +21,14 @@ async function resolveProjectWorkspace(opts) {
21
21
  return null;
22
22
  }
23
23
  const detection = (0, repo_name_1.detectRepoName)(opts.projectDir);
24
- console.log('');
25
- console.log(' No Ritual workspace is bound to this project yet.');
26
- console.log('');
27
- console.log(' A workspace is this project\'s persistent memory in Ritual explorations,');
28
- console.log(' decisions, build briefs, and context agents can reuse across sessions.');
29
- console.log('');
30
- console.log(` Detected project name: ${detection.name} (from ${detection.source}${detection.originUrl ? ` ${detection.originUrl}` : ''})`);
24
+ // Concept-level "what is a workspace" copy AND the "Detected
25
+ // project name: foo (from cwd-basename)" line used to live here.
26
+ // Both moved out: the explainer above teaches the concept and
27
+ // already renders the workspace name in its title, so repeating
28
+ // "Detected project name: foo" in this prompt is redundant. The
29
+ // detected name still appears INSIDE the bind question itself
30
+ // (`Create new workspace "foo"…?`), which is where the user
31
+ // actually needs to see it to accept or rename.
31
32
  console.log('');
32
33
  let answer;
33
34
  try {