@archangel70/cosmo 1.9.0 → 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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable Cosmo changes are recorded here.
4
4
 
5
+ ## 1.10.0 — Guided start
6
+
7
+ - Replaced the bare `cosmo` command dump with a friendly, context-aware start screen and an explicit `cosmo help` developer reference.
8
+ - Added a Claude Cosmo agent with first-time guidance modeled around clear choices, a seven-phase website journey, and one unmistakable next step.
9
+ - Updated Claude, Codex, and Antigravity launchers to orient nontechnical users, recover the current project stage, and keep internal commands out of the way.
10
+ - Preserved the Claude-specific launcher during installation instead of replacing it with the generic cross-agent skill.
11
+ - Added regression tests for empty folders, existing Astro sites, active Cosmo projects, and installed launcher guidance.
12
+
5
13
  ## 1.9.0 — Multi-agent Cosmo
6
14
 
7
15
  - Added first-class Claude, Codex, and Google Antigravity setup, status, update, and removal commands.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Cosmo helps an AI coding assistant build a complete, original Astro website for
4
4
 
5
5
  You do **not** need to know how to code. Cosmo supports Claude Code, Codex, and Google Antigravity.
6
6
 
7
- Current version: **1.9.0**
7
+ Current version: **1.10.0**
8
8
 
9
9
  ## Quick install
10
10
 
@@ -82,7 +82,7 @@ This is the only part of the beginner setup that uses a terminal. It is one inst
82
82
  cosmo --version
83
83
  ```
84
84
 
85
- You should see `1.9.0` or a newer version. Cosmo automatically installs its Claude, Codex, and Antigravity launchers.
85
+ You should see `1.10.0` or a newer version. Cosmo automatically installs its Claude, Codex, and Antigravity launchers.
86
86
 
87
87
  ### On Windows
88
88
 
@@ -99,7 +99,7 @@ You should see `1.9.0` or a newer version. Cosmo automatically installs its Clau
99
99
  cosmo --version
100
100
  ```
101
101
 
102
- You should see `1.9.0` or a newer version. Cosmo automatically installs its Claude, Codex, and Antigravity launchers.
102
+ You should see `1.10.0` or a newer version. Cosmo automatically installs its Claude, Codex, and Antigravity launchers.
103
103
 
104
104
  ## Step 4: create your website folder
105
105
 
@@ -120,7 +120,9 @@ Enter the instruction for your assistant:
120
120
  - Codex: `$cosmo` (or ask, “Use Cosmo to build this site.”)
121
121
  - Google Antigravity: `/cosmo`
122
122
 
123
- Your assistant will recognize the empty folder and begin the guided website process. It will ask about the business, audience, goals, pages, brand, content, proof, and visual direction.
123
+ Cosmo will first explain the complete website journey, recognize what is already in the folder, and give you one clear next step. In a new folder, the first question is simply what the business or project is called and what it does.
124
+
125
+ From that point forward, Cosmo chooses the appropriate internal tools and tells you where you are in the process. You do not need to guess whether design, copywriting, page planning, development, or testing comes next.
124
126
 
125
127
  Answer in normal language. You do not need to use special commands or technical terms. If you do not know an answer, say so. Cosmo should ask for clarification instead of inventing business facts.
126
128
 
@@ -595,6 +597,9 @@ Run `cosmo help` for the installed version's canonical syntax.
595
597
 
596
598
  | Command | Purpose |
597
599
  | --- | --- |
600
+ | `cosmo` | Show the friendly, context-aware next step for the current folder. |
601
+ | `cosmo start [directory]` | Show the guided next step for a specified folder. |
602
+ | `cosmo help` | Show the complete developer command reference. |
598
603
  | `cosmo setup [--agent name]` | Install or repair all launchers, or only Claude, Codex, or Antigravity. |
599
604
  | `cosmo agent list` | Show supported agents and whether each adapter is ready. |
600
605
  | `cosmo agent install <name|all> [--replace]` | Install or update one or every agent adapter. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archangel70/cosmo",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Local-first, multi-agent Astro website builder for Claude, Codex, Antigravity, and the command line.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -17,6 +17,7 @@ import { configureDeployment, deployProject, readDeploymentConfig, readDeploymen
17
17
  import { evaluateIntelligence, writeIntelligenceReport } from '../lib/intelligence-audit.mjs';
18
18
  import { createHandoff, readHandoff } from '../lib/handoff.mjs';
19
19
  import { checkIntegrity, createPageBrief, scaffoldIntegrity } from '../lib/integrity.mjs';
20
+ import { launcherGuide } from '../lib/launcher.mjs';
20
21
  import {
21
22
  addIntelligencePack,
22
23
  applyIntelligenceProfile,
@@ -62,10 +63,10 @@ import {
62
63
  workflowSummary,
63
64
  } from '../lib/workflow.mjs';
64
65
 
65
- const VERSION = '1.9.0';
66
+ const VERSION = '1.10.0';
66
67
  const cliDirectory = path.dirname(fileURLToPath(import.meta.url));
67
68
  const templateDirectory = path.resolve(cliDirectory, '../../../templates/astro-site');
68
- const [command = 'help', ...rawArgs] = process.argv.slice(2);
69
+ const [command = 'start', ...rawArgs] = process.argv.slice(2);
69
70
 
70
71
  function projectDirectory(value = '.') {
71
72
  return path.resolve(process.cwd(), value);
@@ -76,6 +77,9 @@ function help() {
76
77
  Cosmo ${VERSION} — local-first Astro site builder
77
78
 
78
79
  Commands
80
+ cosmo Show the guided next step for this folder
81
+ cosmo start [directory] Show the guided next step for another folder
82
+ cosmo help Show the complete developer command reference
79
83
  cosmo setup [--agent claude|codex|antigravity|all]
80
84
  cosmo agent list
81
85
  cosmo agent install <claude|codex|antigravity|all> [--replace]
@@ -152,6 +156,11 @@ Commands
152
156
  `);
153
157
  }
154
158
 
159
+ function start(args) {
160
+ const { positional } = parseOptions(args);
161
+ console.log(launcherGuide(projectDirectory(positional[0] ?? '.'), VERSION));
162
+ }
163
+
155
164
  async function init(args) {
156
165
  const { options, positional } = parseOptions(args);
157
166
  const target = projectDirectory(positional[0] ?? '.');
@@ -986,6 +995,7 @@ async function deployCommand(args) {
986
995
 
987
996
  async function main() {
988
997
  if (command === 'help' || command === '--help' || command === '-h') return help();
998
+ if (command === 'start') return start(rawArgs);
989
999
  if (command === '--version' || command === '-v' || command === 'version') return console.log(VERSION);
990
1000
  if (command === 'setup') return setup(rawArgs);
991
1001
  if (command === 'init') return init(rawArgs);
@@ -46,7 +46,8 @@ export function installClaudePlugin({ target = claudePluginTarget(), source = de
46
46
 
47
47
  fs.mkdirSync(path.dirname(target), { recursive: true });
48
48
  fs.cpSync(source, target, { recursive: true });
49
- if (fs.existsSync(sharedSkill)) fs.copyFileSync(sharedSkill, path.join(target, 'skills', 'cosmo', 'SKILL.md'));
49
+ const installedSkill = path.join(target, 'skills', 'cosmo', 'SKILL.md');
50
+ if (!fs.existsSync(installedSkill) && fs.existsSync(sharedSkill)) fs.copyFileSync(sharedSkill, installedSkill);
50
51
  const launcher = path.join(target, 'bin', 'cosmo');
51
52
  fs.writeFileSync(launcher, `#!/bin/sh\nexec ${shellQuote(process.execPath)} ${shellQuote(runtimeCli)} "$@"\n`);
52
53
  fs.chmodSync(launcher, 0o755);
@@ -0,0 +1,111 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { loadWorkflow, readWorkflowState } from './workflow.mjs';
4
+
5
+ const FRIENDLY_IGNORED_FILES = new Set(['.DS_Store', '.git']);
6
+
7
+ function hasAstroDependency(projectDir) {
8
+ const packageFile = path.join(projectDir, 'package.json');
9
+ if (!fs.existsSync(packageFile)) return false;
10
+ try {
11
+ const packageJson = JSON.parse(fs.readFileSync(packageFile, 'utf8'));
12
+ return Boolean(packageJson.dependencies?.astro || packageJson.devDependencies?.astro);
13
+ } catch {
14
+ return false;
15
+ }
16
+ }
17
+
18
+ function hasAstroConfig(projectDir) {
19
+ if (!fs.existsSync(projectDir)) return false;
20
+ return fs.readdirSync(projectDir).some((entry) => /^astro\.config\.(?:js|mjs|cjs|ts)$/.test(entry));
21
+ }
22
+
23
+ export function classifyWorkspace(projectDir) {
24
+ const target = path.resolve(projectDir);
25
+ if (fs.existsSync(path.join(target, '.cosmo', 'project.json'))) return 'cosmo';
26
+ if (hasAstroDependency(target) || hasAstroConfig(target)) return 'astro';
27
+ if (!fs.existsSync(target)) return 'missing';
28
+ const visibleEntries = fs.readdirSync(target).filter((entry) => !FRIENDLY_IGNORED_FILES.has(entry));
29
+ return visibleEntries.length === 0 ? 'empty' : 'other';
30
+ }
31
+
32
+ function currentCosmoStep(projectDir) {
33
+ const stateRecord = readWorkflowState(projectDir, { required: false });
34
+ if (!stateRecord) {
35
+ return {
36
+ found: 'I found a Cosmo site that has not started its guided workflow yet.',
37
+ next: 'Tell your assistant: “Start the guided Cosmo workflow for this site.”',
38
+ };
39
+ }
40
+
41
+ const state = stateRecord.data;
42
+ if (state.status === 'complete') {
43
+ return {
44
+ found: 'I found a completed Cosmo build.',
45
+ next: 'Tell your assistant what you want to change, or ask: “Check whether this site is ready to publish.”',
46
+ };
47
+ }
48
+
49
+ const workflow = loadWorkflow(projectDir, state.workflowId).data;
50
+ const stage = workflow.stages.find((item) => item.id === state.currentStage);
51
+ const position = workflow.stages.findIndex((item) => item.id === state.currentStage) + 1;
52
+ const status = state.stages[state.currentStage]?.status;
53
+ if (status === 'awaiting_approval') {
54
+ return {
55
+ found: `I found an active build at step ${position} of ${workflow.stages.length}: ${stage.title}.`,
56
+ next: `Review the ${stage.title.toLowerCase()} work with your assistant. Ask for changes, or approve it so Cosmo can continue.`,
57
+ };
58
+ }
59
+ return {
60
+ found: `I found an active build at step ${position} of ${workflow.stages.length}: ${stage.title}.`,
61
+ next: `Tell your assistant: “Continue my Cosmo site.” It will pick up ${stage.title.toLowerCase()} from the saved project.`,
62
+ };
63
+ }
64
+
65
+ export function launcherGuide(projectDir = process.cwd(), version = 'unknown') {
66
+ const target = path.resolve(projectDir);
67
+ const kind = classifyWorkspace(target);
68
+ let context;
69
+
70
+ if (kind === 'cosmo') context = currentCosmoStep(target);
71
+ if (kind === 'astro') context = {
72
+ found: 'I found an existing Astro website in this folder.',
73
+ next: 'Tell your assistant: “Use Cosmo to improve this existing Astro site.” Cosmo will inspect it before changing anything.',
74
+ };
75
+ if (kind === 'empty') context = {
76
+ found: 'This empty folder is ready for a new website.',
77
+ next: 'Tell your assistant: “Use Cosmo to build a new website here.” It will begin by asking about the business and its customers.',
78
+ };
79
+ if (kind === 'missing') context = {
80
+ found: 'This folder does not exist yet.',
81
+ next: 'Open or create the folder where you want the website, then ask your assistant to use Cosmo.',
82
+ };
83
+ if (kind === 'other') context = {
84
+ found: 'This folder contains files, but it is not currently a Cosmo or Astro website.',
85
+ next: 'Tell your assistant what the files are, or ask it to create a new Cosmo website in a separate folder.',
86
+ };
87
+
88
+ return `
89
+ Cosmo ${version} — your guided Astro website builder
90
+
91
+ You do not need to learn Cosmo commands or decide which tool comes next.
92
+ Your AI assistant will guide the work, save progress, and stop when it needs your approval.
93
+
94
+ ${context.found}
95
+
96
+ NEXT STEP
97
+ ${context.next}
98
+
99
+ THE WEBSITE JOURNEY
100
+ 1. Understand the business, audience, goals, and real-world evidence
101
+ 2. Define the brand, positioning, voice, and creative direction
102
+ 3. Explore and approve a distinctive visual design
103
+ 4. Plan the pages and write evidence-grounded copy
104
+ 5. Build the Astro website one approved pattern at a time
105
+ 6. Test accessibility, content, SEO, performance, and release readiness
106
+ 7. Preview, approve, and deploy
107
+
108
+ At any time, simply say “Cosmo” or “Continue my Cosmo site.”
109
+ For the developer command reference only, run: cosmo help
110
+ `;
111
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "cosmo",
3
- "version": "1.9.0"
3
+ "version": "1.10.0"
4
4
  }
@@ -17,6 +17,17 @@ Act as the conversational front door to Cosmo. The user should not need to know
17
17
  - Explain the immediate decision in plain language instead of exposing the whole internal pipeline.
18
18
  - Treat design as an independent creative problem. Claude Design may be used when available, but is never required; another design authority or the current agent can satisfy the same repository-owned contract.
19
19
 
20
+ ## First response to `cosmo`
21
+
22
+ When the user's request is only `cosmo`, do not execute bare `cosmo` and paste its developer command list. Inspect the current folder without changing it, then orient the user before doing work.
23
+
24
+ - Empty folder: explain that Cosmo will guide discovery, brand, design, copy, Astro development, QA, and launch. Ask only for the business/project name and what it does.
25
+ - Existing Cosmo project: recover the saved stage, summarize completed approvals, and state the single next decision or action.
26
+ - Existing Astro site: explain that Cosmo can inspect and adopt it without replacing working source, then offer that inspection.
27
+ - Other non-empty folder: explain that a new website needs a separate child folder and ask what it should be called.
28
+
29
+ Use a progress line at every transition: `Step N of 7 — <plain-language phase>`, followed by what was completed and what happens next. The seven user-facing phases are Discover, Brand, Design, Copy and page plan, Build, Quality checks, and Preview and launch. Internally, continue to follow every repository workflow stage and approval gate.
30
+
20
31
  ## Verify and classify
21
32
 
22
33
  Run `cosmo --version`, then inspect the current directory without changing it:
@@ -65,4 +76,4 @@ Any supported agent may continue the project. Before switching, run appropriate
65
76
 
66
77
  ## Help
67
78
 
68
- When asked what Cosmo can do, briefly describe new Astro builds, existing-site adoption, resumable workflows, Copy Studio, intelligence profiles, independent design direction, research provenance, production QA, agent handoffs, and Cloudflare/SFTP/FTPS/FTP deployment.
79
+ When asked what Cosmo can do, lead with four choices: build a new website, continue a Cosmo website, improve an existing Astro website, or review/publish a website. Show the simple journey `Discover → Brand → Design → Copy and page plan → Build → Quality checks → Preview and launch`. Mention advanced capabilities only if relevant or requested, and end with one clear question.
@@ -1,8 +1,10 @@
1
- <!-- cosmo-agent-version: 1.9.0 -->
1
+ <!-- cosmo-agent-version: 1.10.0 -->
2
2
  # Cosmo
3
3
 
4
4
  Use the Cosmo website-building workflow in the current workspace.
5
5
 
6
+ If the user invokes `/cosmo` without a specific task, do not print the command reference. Inspect the current folder and give a friendly explanation of what Cosmo found. Explain the simple journey — Discover → Brand → Design → Copy and page plan → Build → Quality checks → Preview and launch — and state exactly one next step. The user should never have to choose an internal command or capability.
7
+
6
8
  First, look for `.agents/skills/cosmo/SKILL.md` and follow it completely when present. If it is absent, apply these minimum rules:
7
9
 
8
10
  - Run `cosmo --version` and inspect the directory before changing anything.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosmo",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Conversational launcher for starting, adopting, and resuming local-first Cosmo Astro website builds.",
5
5
  "author": {
6
6
  "name": "Cosmo"
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: cosmo
3
+ description: A plain-language guide that plans, designs, writes, builds, reviews, and publishes distinctive Astro websites. Use when the user says Cosmo, wants to build or improve a website, or needs the next step in a Cosmo project.
4
+ ---
5
+
6
+ # Cosmo
7
+
8
+ You are the friendly guide for a complete Astro website project. Most users are not developers. They should never have to choose an internal command, skill, capability pack, or build stage.
9
+
10
+ ## First response
11
+
12
+ When the user says only `cosmo`, greet them briefly, inspect the current folder without changing it, and explain what you found in plain language.
13
+
14
+ If the folder is empty, say:
15
+
16
+ > ✨ **Cosmo — let’s build your website**
17
+ >
18
+ > I’ll guide the entire project: understanding the business, shaping the brand, exploring the design, writing the copy, building the Astro site, testing it, and getting it ready to publish. You won’t need to learn commands or decide which step comes next.
19
+ >
20
+ > This folder is empty and ready for a new website.
21
+ >
22
+ > **To begin, tell me:** What is the business or project called, and what does it do?
23
+
24
+ If this is an existing Cosmo project, recover its saved state and say which stage it is in, what has already been approved, and the one decision or action needed next. If it is an existing Astro site, offer to inspect and adopt it without replacing its source. If it contains unrelated files, explain that Cosmo can create the website in a new child folder.
25
+
26
+ Do not run bare `cosmo` and paste its command reference. Do not show a capability catalog before the user needs it. Use the Cosmo skill for the full operating contract and handle the underlying commands yourself.
27
+
28
+ ## How you guide the build
29
+
30
+ Keep the user oriented with a short progress line whenever the stage changes:
31
+
32
+ > **Step 3 of 7 — Visual direction**
33
+ > We have approved the brand. Next I’ll develop distinct design directions for you to compare.
34
+
35
+ The seven plain-language phases are:
36
+
37
+ 1. Understand the business, audience, goals, and evidence.
38
+ 2. Define the brand, positioning, voice, and creative direction.
39
+ 3. Explore and approve a distinctive visual design.
40
+ 4. Plan the site and write evidence-grounded copy.
41
+ 5. Build the Astro site from approved patterns.
42
+ 6. Test accessibility, content, SEO, performance, and release readiness.
43
+ 7. Preview, approve, and deploy.
44
+
45
+ At every approval point, explain what the user is reviewing, give a recommendation, and ask one unmistakable question. After the answer, continue automatically to the next appropriate action.
@@ -19,6 +19,17 @@ You are the conversational front door to Cosmo. Turn a short request such as `co
19
19
  - Keep credentials in environment variables or an ignored runtime env file.
20
20
  - Explain the next decision in plain language; do not dump the whole internal pipeline on a new user.
21
21
 
22
+ ## First response to `cosmo`
23
+
24
+ When the user's request is only `cosmo`, do not execute bare `cosmo` and paste its developer command list. Inspect the current folder without changing it, then orient the user before doing work.
25
+
26
+ - Empty folder: explain that Cosmo will guide discovery, brand, design, copy, Astro development, QA, and launch. Ask only for the business/project name and what it does.
27
+ - Existing Cosmo project: recover the saved stage, summarize completed approvals, and state the single next decision or action.
28
+ - Existing Astro site: explain that Cosmo can inspect and adopt it without replacing working source, then offer that inspection.
29
+ - Other non-empty folder: explain that a new website needs a separate child folder and ask what it should be called.
30
+
31
+ Use a progress line at every transition: `Step N of 7 — <plain-language phase>`, followed by what was completed and what happens next. The seven user-facing phases are Discover, Brand, Design, Copy and page plan, Build, Quality checks, and Preview and launch. Internally, continue to follow every repository workflow stage and approval gate.
32
+
22
33
  ## Step 1: verify the local launcher
23
34
 
24
35
  Run:
@@ -120,4 +131,4 @@ For design, explore at least three genuinely distinct directions and preserve th
120
131
 
121
132
  ## Help mode
122
133
 
123
- If the user asks what Cosmo can do, summarize new builds, Astro adoption, workflow resume, first-party intelligence profiles, Copy Studio, Claude Design handoff, research snapshots, production QA, Claude-to-Codex handoff, and Cloudflare/SFTP/FTPS/FTP deployment. Keep the answer concise and offer to start or resume.
134
+ If the user asks what Cosmo can do, lead with four choices: build a new website, continue a Cosmo website, improve an existing Astro website, or review/publish a website. Show the simple journey `Discover → Brand → Design → Copy and page plan → Build → Quality checks → Preview and launch`. Mention advanced capabilities only if relevant or requested, and end with one clear question.
@@ -6,11 +6,25 @@ disable-model-invocation: true
6
6
 
7
7
  # Cosmo help
8
8
 
9
- Explain that the user can type `cosmo` to start. Present these choices:
9
+ Show this concise, plain-language menu. Adapt the final recommendation to the current folder when possible.
10
10
 
11
- - Build a new Astro site with guided intake and brand discovery.
12
- - Adopt an existing Astro site without replacing its source code.
13
- - Resume an existing Cosmo workflow from repository state.
14
- - Inspect status, QA, release readiness, or deployment.
11
+ > # ✨ Cosmo — What I Can Do
12
+ >
13
+ > Cosmo guides an Astro website from the first idea through launch. You describe the project in normal language; I choose and run the right tools.
14
+ >
15
+ > ## Start here
16
+ >
17
+ > 1. **Build a new website** — I’ll ask about the business, customers, goals, proof, brand, and desired feeling.
18
+ > 2. **Continue a Cosmo website** — I’ll read the saved project, tell you where we stopped, and take the next step.
19
+ > 3. **Improve an existing Astro website** — I’ll inspect it first and add Cosmo’s workflow without replacing working code.
20
+ > 4. **Review or publish a website** — I’ll check copy, accessibility, SEO, performance, release readiness, and deployment.
21
+ >
22
+ > ## How a complete build works
23
+ >
24
+ > **Discover → Brand → Design → Copy and page plan → Build → Quality checks → Preview and launch**
25
+ >
26
+ > You approve the important creative decisions. I handle the sequence and always tell you what comes next.
27
+ >
28
+ > **What would you like to do?**
15
29
 
16
- Mention the explicit commands `/cosmo:cosmo` and `/cosmo:cosmo-help` as fallbacks. Do not make the user learn the underlying CLI unless they ask.
30
+ Mention `/cosmo:cosmo` only as a fallback if natural `cosmo` invocation is not recognized. Do not expose the developer CLI unless the user asks for commands.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmo/astro-starter",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {