@clossys/launcher 0.1.5 → 0.3.1

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 (114) hide show
  1. package/README.md +213 -20
  2. package/contracts/conversation-contract.md +41 -0
  3. package/dist/apply-plan-cli.d.ts +7 -0
  4. package/dist/apply-plan-cli.d.ts.map +1 -0
  5. package/dist/apply-plan-cli.js +96 -0
  6. package/dist/apply-plan-cli.js.map +1 -0
  7. package/dist/apply-plan.d.ts +79 -0
  8. package/dist/apply-plan.d.ts.map +1 -0
  9. package/dist/apply-plan.js +129 -0
  10. package/dist/apply-plan.js.map +1 -0
  11. package/dist/check-cli.d.ts.map +1 -1
  12. package/dist/check-cli.js +3 -0
  13. package/dist/check-cli.js.map +1 -1
  14. package/dist/cli.d.ts +2 -1
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +37 -11
  17. package/dist/cli.js.map +1 -1
  18. package/dist/contract.d.ts +28 -0
  19. package/dist/contract.d.ts.map +1 -0
  20. package/dist/contract.js +78 -0
  21. package/dist/contract.js.map +1 -0
  22. package/dist/core.d.ts +38 -6
  23. package/dist/core.d.ts.map +1 -1
  24. package/dist/core.js +289 -42
  25. package/dist/core.js.map +1 -1
  26. package/dist/doctor-cli.d.ts +4 -0
  27. package/dist/doctor-cli.d.ts.map +1 -0
  28. package/dist/doctor-cli.js +32 -0
  29. package/dist/doctor-cli.js.map +1 -0
  30. package/dist/doctor.d.ts +28 -0
  31. package/dist/doctor.d.ts.map +1 -0
  32. package/dist/doctor.js +68 -0
  33. package/dist/doctor.js.map +1 -0
  34. package/dist/host.d.ts.map +1 -1
  35. package/dist/host.js +3 -0
  36. package/dist/host.js.map +1 -1
  37. package/dist/hosts.d.ts +14 -0
  38. package/dist/hosts.d.ts.map +1 -0
  39. package/dist/hosts.js +61 -0
  40. package/dist/hosts.js.map +1 -0
  41. package/dist/index.d.ts +15 -2
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +7 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/inventory-adoption.d.ts +20 -0
  46. package/dist/inventory-adoption.d.ts.map +1 -0
  47. package/dist/inventory-adoption.js +67 -0
  48. package/dist/inventory-adoption.js.map +1 -0
  49. package/dist/manifest.d.ts +20 -0
  50. package/dist/manifest.d.ts.map +1 -0
  51. package/dist/manifest.js +106 -0
  52. package/dist/manifest.js.map +1 -0
  53. package/dist/model-profile.d.ts +46 -0
  54. package/dist/model-profile.d.ts.map +1 -0
  55. package/dist/model-profile.js +98 -0
  56. package/dist/model-profile.js.map +1 -0
  57. package/dist/product-repository.d.ts +26 -0
  58. package/dist/product-repository.d.ts.map +1 -0
  59. package/dist/product-repository.js +49 -0
  60. package/dist/product-repository.js.map +1 -0
  61. package/dist/skills.d.ts +20 -1
  62. package/dist/skills.d.ts.map +1 -1
  63. package/dist/skills.js +98 -7
  64. package/dist/skills.js.map +1 -1
  65. package/dist/types.d.ts +57 -1
  66. package/dist/types.d.ts.map +1 -1
  67. package/model-profiles/claude-code.json +10 -0
  68. package/model-profiles/codex.json +10 -0
  69. package/model-profiles/cursor.json +10 -0
  70. package/package.json +9 -5
  71. package/skeleton/README.md +5 -0
  72. package/skeleton/package.json +1 -1
  73. package/skill/SKILL.md +41 -0
  74. package/skill-catalogue/advisor/SKILL.md +46 -8
  75. package/skill-catalogue/architect/SKILL.md +0 -11
  76. package/skill-catalogue/bouncer/SKILL.md +0 -11
  77. package/skill-catalogue/builder/SKILL.md +0 -11
  78. package/skill-catalogue/butler/SKILL.md +0 -11
  79. package/skill-catalogue/controller/SKILL.md +6 -9
  80. package/skill-catalogue/customer/SKILL.md +83 -0
  81. package/skill-catalogue/designer/SKILL.md +18 -9
  82. package/skill-catalogue/giver/SKILL.md +0 -11
  83. package/skill-catalogue/influencer/SKILL.md +0 -11
  84. package/skill-catalogue/inspector/SKILL.md +1 -12
  85. package/skill-catalogue/integrator/SKILL.md +0 -11
  86. package/skill-catalogue/keeper/SKILL.md +0 -11
  87. package/skill-catalogue/launcher/SKILL.md +0 -12
  88. package/skill-catalogue/locksmith/SKILL.md +0 -11
  89. package/skill-catalogue/messenger/SKILL.md +0 -11
  90. package/skill-catalogue/observer/SKILL.md +0 -11
  91. package/skill-catalogue/publisher/SKILL.md +18 -10
  92. package/skill-catalogue/starter/SKILL.md +0 -11
  93. package/skill-catalogue/strategist/SKILL.md +35 -12
  94. package/skill-catalogue/writer/SKILL.md +7 -9
  95. package/src/apply-plan-cli.ts +94 -0
  96. package/src/apply-plan.ts +172 -0
  97. package/src/check-cli.ts +3 -0
  98. package/src/cli.ts +45 -10
  99. package/src/contract.ts +81 -0
  100. package/src/core.ts +337 -37
  101. package/src/doctor-cli.ts +33 -0
  102. package/src/doctor.ts +145 -0
  103. package/src/host.ts +3 -0
  104. package/src/hosts.ts +79 -0
  105. package/src/index.ts +33 -0
  106. package/src/inventory-adoption.ts +85 -0
  107. package/src/manifest.ts +103 -0
  108. package/src/model-profile.ts +148 -0
  109. package/src/product-repository.ts +73 -0
  110. package/src/skills.ts +113 -8
  111. package/src/types.ts +58 -1
  112. package/CHANGELOG.md +0 -64
  113. /package/skeleton/{.clossys → clossys/.state}/inventory.json +0 -0
  114. /package/skeleton/{.clossys → clossys/.state}/workspace.json +0 -0
package/dist/skills.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { dirname, join, resolve, sep } from "node:path";
2
- const DISCOVERY_PREFIXES = [".cursor/skills", ".claude/skills"];
2
+ import { extractContractBlock, injectContract } from "./contract.js";
3
+ import { parseSkillManifest, readInstalledVersion, serializeSkillManifest, sha256Hex } from "./manifest.js";
4
+ export const DISCOVERY_PREFIXES = [".cursor/skills", ".claude/skills"];
3
5
  const AGENTS_SKILLS_REL = join(".agents", "skills");
6
+ export const SKILLS_MANIFEST_REL = join("clossys", ".state", "skills.json");
4
7
  function containedPath(root, relativePath) {
5
8
  const resolved = resolve(root, relativePath);
6
9
  const prefix = root.endsWith(sep) ? root : `${root}${sep}`;
@@ -18,14 +21,61 @@ function skillSourceCandidates(packageDir, options) {
18
21
  paths.push(join(options.launcherPackageRoot, "..", packageDir, "skill", "SKILL.md"));
19
22
  return paths;
20
23
  }
21
- function readSkillBody(host, packageDir, options) {
24
+ function installedSkillPath(composeTargetDirectory, packageDir) {
25
+ return join(composeTargetDirectory, "node_modules", "@clossys", packageDir, "skill", "SKILL.md");
26
+ }
27
+ function readSkillBody(host, packageDir, options, composeTargetDirectory) {
28
+ const installed = host.readText(installedSkillPath(composeTargetDirectory, packageDir));
29
+ if (installed !== null)
30
+ return { body: installed, source: "installed" };
22
31
  for (const path of skillSourceCandidates(packageDir, options)) {
23
32
  const body = host.readText(path);
24
33
  if (body !== null)
25
- return body;
34
+ return { body, source: "catalogue" };
35
+ }
36
+ return null;
37
+ }
38
+ function contractSourceCandidates(options) {
39
+ const paths = [];
40
+ if (options.contractPath)
41
+ paths.push(options.contractPath);
42
+ paths.push(join(options.launcherPackageRoot, "contracts", "conversation-contract.md"));
43
+ // Monorepo fallback so tests and dev runs work without a prior `npm run build` pack step.
44
+ paths.push(join(options.launcherPackageRoot, "..", "..", "docs", "contracts", "conversation-contract.md"));
45
+ return paths;
46
+ }
47
+ /** Reads and extracts the shared conversation contract block. Returns null when no source resolves. */
48
+ function readContractBlock(host, options) {
49
+ for (const path of contractSourceCandidates(options)) {
50
+ const raw = host.readText(path);
51
+ if (raw === null)
52
+ continue;
53
+ try {
54
+ return extractContractBlock(raw);
55
+ }
56
+ catch {
57
+ continue;
58
+ }
26
59
  }
27
60
  return null;
28
61
  }
62
+ function readLauncherVersion(host, options) {
63
+ const raw = host.readText(join(options.launcherPackageRoot, "package.json"));
64
+ if (raw === null)
65
+ return undefined;
66
+ try {
67
+ const parsed = JSON.parse(raw);
68
+ if (typeof parsed === "object" && parsed !== null && "version" in parsed) {
69
+ const version = parsed.version;
70
+ if (typeof version === "string" && version.trim() !== "")
71
+ return version;
72
+ }
73
+ }
74
+ catch {
75
+ /* unreadable manifest; no version */
76
+ }
77
+ return undefined;
78
+ }
29
79
  /** Package directory names that have a resolvable skill source in the catalogue or monorepo. */
30
80
  export function listSkillPackageCandidates(host, options) {
31
81
  const names = new Set();
@@ -84,23 +134,64 @@ function writeDiscoveryLink(host, directory, packageDir, skillBody) {
84
134
  }
85
135
  }
86
136
  }
137
+ /** Removes a composed skill's `.agents/skills/` directory and its host discovery links. Missing paths are no-ops. */
138
+ function removeComposedSkill(host, directory, packageDir) {
139
+ host.remove(containedPath(directory, join(AGENTS_SKILLS_REL, `clossys-${packageDir}`)));
140
+ for (const prefix of DISCOVERY_PREFIXES) {
141
+ const prefixPath = containedPath(directory, prefix);
142
+ if (host.isSymlink(prefixPath))
143
+ continue; // shared view onto .agents/skills; already handled above
144
+ host.remove(containedPath(directory, join(prefix, `clossys-${packageDir}`)));
145
+ }
146
+ }
87
147
  /**
88
148
  * Writes `.agents/skills/clossys-<pkg>/SKILL.md` and host discovery links for every
89
- * catalogue package. Missing sources are skipped with notes; the hub apply continues.
149
+ * catalogue package, with the shared conversation contract (#1182) injected in place
150
+ * of each skill's own `## How we work together` / `## One question at a time`
151
+ * sections. Missing sources are skipped with notes; the hub apply continues.
152
+ *
153
+ * Also writes `clossys/.state/skills.json` (#1183): source, version, and content
154
+ * digest per composed skill. A skill named in this directory's *previous* manifest
155
+ * but not composed this run is retired — its composed output is pruned and it is
156
+ * dropped from the new manifest. Never touches a skill this directory's manifest
157
+ * did not itself write.
90
158
  */
91
159
  export function composeSkills(host, directory, options) {
92
160
  const composed = [];
93
161
  const skipped = [];
162
+ const manifestEntries = [];
163
+ const contractBlock = readContractBlock(host, options);
164
+ const launcherVersion = readLauncherVersion(host, options);
94
165
  for (const packageDir of listSkillPackageCandidates(host, options)) {
95
- const body = readSkillBody(host, packageDir, options);
96
- if (body === null) {
166
+ const found = readSkillBody(host, packageDir, options, directory);
167
+ if (found === null) {
97
168
  skipped.push({ packageDir, note: "skill source missing at apply time" });
98
169
  continue;
99
170
  }
171
+ const body = contractBlock === null ? found.body : injectContract(found.body, contractBlock);
100
172
  writeAgentsSkill(host, directory, packageDir, body);
101
173
  writeDiscoveryLink(host, directory, packageDir, body);
102
174
  composed.push(packageDir);
175
+ const version = found.source === "installed" ? readInstalledVersion(host, directory, packageDir) : launcherVersion;
176
+ manifestEntries.push({
177
+ name: packageDir,
178
+ source: found.source,
179
+ sha256: sha256Hex(body.endsWith("\n") ? body : `${body}\n`),
180
+ ...(version === undefined ? {} : { version }),
181
+ });
182
+ }
183
+ const previousManifest = parseSkillManifest(host.readText(join(directory, SKILLS_MANIFEST_REL)));
184
+ const composedSet = new Set(composed);
185
+ const retired = [];
186
+ for (const entry of previousManifest?.skills ?? []) {
187
+ if (composedSet.has(entry.name))
188
+ continue;
189
+ removeComposedSkill(host, directory, entry.name);
190
+ retired.push(entry.name);
103
191
  }
104
- return { composed, skipped };
192
+ const manifestPath = containedPath(directory, SKILLS_MANIFEST_REL);
193
+ host.mkdirp(dirname(manifestPath));
194
+ host.writeText(manifestPath, serializeSkillManifest({ schemaVersion: 1, generatedAt: host.now(), skills: manifestEntries }));
195
+ return { composed, skipped, retired };
105
196
  }
106
197
  //# sourceMappingURL=skills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAaxD,MAAM,kBAAkB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAU,CAAC;AACzE,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAEpD,SAAS,aAAa,CAAC,IAAY,EAAE,YAAoB;IACvD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,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AAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;YAC3D,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;SAC9C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjG,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC;QACnD,IAAI,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,SAAS;QAC1C,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,YAAY,GAAG,aAAa,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IACnE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IACnC,IAAI,CAAC,SAAS,CACZ,YAAY,EACZ,sBAAsB,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAC/F,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACxC,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { DiscoveredHost } from "./hosts.js";
2
+ import type { ExternalInventoryDeclaration, InventoryDriftReport } from "./inventory-adoption.js";
1
3
  /** Ternary retained by the installed CLI. */
2
4
  export type WorkspaceState = "satisfied" | "violated" | "indeterminate";
3
5
  /** Captured stdout/stderr from a host command. */
@@ -21,18 +23,49 @@ export interface WorkspaceHost {
21
23
  mkdirp(path: string): void;
22
24
  /** Creates a relative symlink at linkPath pointing at relativeTarget (directory link). */
23
25
  symlink(relativeTarget: string, linkPath: string): void;
26
+ /** Recursively removes path. A missing path is a no-op, never a throw. */
27
+ remove(path: string): void;
24
28
  readDir(path: string): string[];
25
29
  run(command: string, args: readonly string[], options?: {
26
30
  cwd?: string;
27
31
  }): CommandResult;
28
32
  prompt(message: string, choices: readonly string[]): string | null;
29
33
  }
30
- /** On-disk hub marker generated on the consumer hub. Packed template: skeleton/.clossys/workspace.json. */
34
+ /** On-disk hub marker generated on the consumer hub. Packed template: skeleton/clossys/.state/workspace.json. */
31
35
  export interface HubDocument {
32
36
  readonly schemaVersion: 1;
33
37
  readonly kind: "account-hub";
34
38
  readonly owner: string;
35
39
  readonly repository: string;
40
+ /** Declares an existing external repository inventory as the source of truth (#1216). Hand-edited by the client; launcher never writes this field. */
41
+ readonly externalInventory?: ExternalInventoryDeclaration;
42
+ }
43
+ /**
44
+ * Where the hub marker was found relative to the `.clossys/` -> `clossys/.state/`
45
+ * migration (#1171): `clean` — only the current path. `legacy` — only the old
46
+ * `.clossys/` path; resume migrates it. `indeterminate` — both paths carry a
47
+ * parseable marker; launcher never merges them silently and refuses instead.
48
+ */
49
+ export type HubMigrationState = "clean" | "legacy" | "indeterminate";
50
+ /** One skill recorded in `clossys/.state/skills.json` (#1183). */
51
+ export interface SkillManifestEntry {
52
+ readonly name: string;
53
+ readonly source: "installed" | "catalogue";
54
+ readonly version?: string;
55
+ readonly sha256: string;
56
+ }
57
+ /** The `clossys/.state/skills.json` document itself. */
58
+ export interface SkillManifestDocument {
59
+ readonly schemaVersion: 1;
60
+ readonly generatedAt: string;
61
+ readonly skills: readonly SkillManifestEntry[];
62
+ }
63
+ /** Read-only freshness summary derived from the skills manifest for the health report. */
64
+ export interface SkillsManifestSummary {
65
+ readonly status: "present" | "missing";
66
+ readonly total: number;
67
+ readonly stale: number;
68
+ readonly retired: number;
36
69
  }
37
70
  export interface InventoryObservation {
38
71
  readonly status: "missing" | "empty" | "populated";
@@ -76,6 +109,10 @@ export interface HubHealthReport {
76
109
  readonly extraClossys: readonly string[];
77
110
  readonly pinFindings: readonly PinFinding[];
78
111
  readonly degraded: boolean;
112
+ /** Coding-agent hosts this apply found already linked for skill discovery here, recorded before compose ran (#1180). Always present after apply. */
113
+ readonly linkedHosts?: readonly DiscoveredHost[];
114
+ /** Present only when the hub marker declares an external inventory (#1216) and there is something to say about it (i.e. not "no-external-source"). */
115
+ readonly inventoryDrift?: InventoryDriftReport;
79
116
  readonly skillComposition?: {
80
117
  readonly composed: readonly string[];
81
118
  readonly skipped: readonly {
@@ -87,12 +124,25 @@ export interface HubHealthReport {
87
124
  readonly inventoryId: string;
88
125
  readonly note: string;
89
126
  }[];
127
+ readonly retired?: readonly string[];
90
128
  };
129
+ /** Present only on the run that performed the `.clossys/` -> `clossys/.state/` migration. */
130
+ readonly migration?: {
131
+ readonly status: "migrated";
132
+ readonly from: string;
133
+ readonly to: string;
134
+ };
135
+ /** Freshness summary derived from `clossys/.state/skills.json`, when present. */
136
+ readonly skillsManifest?: SkillsManifestSummary;
91
137
  }
92
138
  /** Optional paths for skill composition during apply. */
93
139
  export interface ApplyWorkspaceOptions {
94
140
  readonly skillCatalogueRoot?: string;
95
141
  readonly launcherPackageRoot?: string;
142
+ /** Overrides where the packed conversation contract is read from (tests). */
143
+ readonly contractPath?: string;
144
+ /** Live registry `@clossys/launcher` version, used only to grade catalogue-sourced skill staleness. */
145
+ readonly liveLauncherVersion?: string;
96
146
  }
97
147
  export interface CwdObservation {
98
148
  readonly absolutePath: string;
@@ -103,6 +153,8 @@ export interface CwdObservation {
103
153
  readonly hub?: HubDocument;
104
154
  readonly looksLikeFoundry: boolean;
105
155
  readonly inventory?: InventoryObservation;
156
+ /** Present only when a hub marker was found; absent means neither path has one. */
157
+ readonly hubMigration?: HubMigrationState;
106
158
  }
107
159
  export interface WorkspaceObservation {
108
160
  readonly cwd: CwdObservation;
@@ -129,6 +181,10 @@ export interface WorkspacePlanResume {
129
181
  readonly repository: string;
130
182
  readonly directory: string;
131
183
  readonly clone: boolean;
184
+ /** Live registry Advisor version, when observeWorkspace could read one. Used only to grade health. */
185
+ readonly advisorVersion?: string;
186
+ /** Set when the hub marker was found only at the legacy `.clossys/` path; apply migrates it. */
187
+ readonly migrateFrom?: "legacy";
132
188
  }
133
189
  export interface WorkspacePlanAdopt {
134
190
  readonly action: "adopt";
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,CAAC;AAExE,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,+EAA+E;AAC/E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,GAAG,IAAI,MAAM,CAAC;IACd,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,8FAA8F;IAC9F,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,IAAI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5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,gGAAgG;IAChG,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,oHAAoH;IACpH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAE3F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAEjE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;CAClC"}
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "host": "claude-code",
4
+ "verifiedAt": "2026-09-22",
5
+ "tiers": {
6
+ "light": { "balanced": "claude-haiku-4-5" },
7
+ "standard": { "balanced": "claude-sonnet-5", "costConscious": "claude-haiku-4-5" },
8
+ "deep": { "balanced": "claude-opus-5", "costConscious": "claude-sonnet-5" }
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "host": "codex",
4
+ "verifiedAt": "2026-09-22",
5
+ "tiers": {
6
+ "light": { "balanced": "gpt-5-codex-mini" },
7
+ "standard": { "balanced": "gpt-5-codex", "costConscious": "gpt-5-codex-mini" },
8
+ "deep": { "balanced": "gpt-5-codex-high" }
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "host": "cursor",
4
+ "verifiedAt": "2026-09-22",
5
+ "tiers": {
6
+ "light": { "balanced": "cursor-small" },
7
+ "standard": { "balanced": "claude-sonnet-5", "costConscious": "cursor-small" },
8
+ "deep": { "balanced": "claude-opus-5", "costConscious": "claude-sonnet-5" }
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clossys/launcher",
3
- "version": "0.1.5",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,17 +15,21 @@
15
15
  },
16
16
  "bin": {
17
17
  "launcher": "dist/cli.js",
18
- "launcher-check": "dist/check-cli.js"
18
+ "launcher-check": "dist/check-cli.js",
19
+ "launcher-doctor": "dist/doctor-cli.js",
20
+ "launcher-apply-plan": "dist/apply-plan-cli.js"
19
21
  },
20
22
  "files": [
21
23
  "dist",
22
24
  "src",
23
25
  "!src/**/*.test.ts",
24
26
  "skeleton",
27
+ "model-profiles",
25
28
  "skill-catalogue",
29
+ "contracts",
26
30
  "README.md",
27
- "CHANGELOG.md",
28
- "LICENSE"
31
+ "LICENSE",
32
+ "skill"
29
33
  ],
30
34
  "sideEffects": false,
31
35
  "description": "Foundry workspace scaffolder: create, resume, or adopt a GitHub repository as the account hub. Executable tooling, not a role.",
@@ -58,7 +62,7 @@
58
62
  "devDependencies": {
59
63
  "@types/node": "^26.5.1",
60
64
  "typescript": "~6.0.0",
61
- "vitest": "^5.0.0"
65
+ "vitest": "^5.0.1"
62
66
  },
63
67
  "publishConfig": {
64
68
  "registry": "https://registry.npmjs.org",
@@ -10,6 +10,11 @@ is not how we signal incompatibility — `@clossys-advisor` is the hiring check.
10
10
  Run `npx @clossys/launcher` again for hub health and to refresh voices on
11
11
  clones next to the hub, not as how you talk to packages.
12
12
 
13
+ Open this repository in your coding agent. Talk in ordinary sentences.
14
+ Advisor is read-only until you approve a next action. A yes in chat is
15
+ permission for that one step; it is not a grant and it does not write
16
+ git unless a file is saved later.
17
+
13
18
  Advisor is read-only until the sponsor approves a next action.
14
19
 
15
20
  ## What this hub pins
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "__REPOSITORY_NAME__",
2
+ "name": "@__OWNER__/__REPOSITORY_NAME__",
3
3
  "private": true,
4
4
  "description": "Account workspace hub for Foundry engagement. Not a product application.",
5
5
  "license": "MIT",
package/skill/SKILL.md ADDED
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: clossys-launcher
3
+ description: Workspace hub create, appoint, resume, and health for Foundry engagements. Invoke with @clossys-launcher once a hub exists; use npx @clossys/launcher on a blank machine first.
4
+ disable-model-invocation: true
5
+ ---
6
+ # clossys-launcher
7
+
8
+ You are Launcher. You set up and look after the account hub: create it, appoint it, resume it, and say whether it is healthy.
9
+
10
+ You coordinate where Foundry packages are pinned and inventoried. You do not dump the catalogue into package.json or claim adoption or closure.
11
+
12
+
13
+ ## Foundry voices
14
+
15
+ The same team is in every inventoried repo. Name another `@clossys-<package>` to talk to them. A missing mention is a bug, not a compatibility signal. Hiring and fit always go through `@clossys-advisor`.
16
+
17
+ ## Hub setup
18
+
19
+ - You can talk about hub setup from any inventoried repo; creating, appointing, resuming, and health are still your job.
20
+ - On a blank machine with no hub yet, `npx @clossys/launcher` runs once from the hub directory or an empty folder; only then are skills composed on the hub.
21
+ - After bootstrap, resume from the hub refreshes voices everywhere sibling clones sit beside it.
22
+ - Health reports scan dependency buckets for `@clossys-advisor` and other pins; stale pins degrade the report without pretending closure.
23
+ - You never rewrite the lockfile or pour the whole catalogue into package.json.
24
+
25
+ ## When this package is installed
26
+
27
+ If `node_modules/@clossys/launcher` is present (or this package's bins are on PATH), use the exact pin in the tree. Read `package.json` `bin` for the real command names.
28
+ - Assessment CLI: `launcher`
29
+ - Also available: `launcher-check`
30
+
31
+ Summarize gate results in human language; keep machine kinds for tooling, not as the default reply.
32
+
33
+ ## When this package is not installed
34
+
35
+ You are here as a person in this repo the same way you are in every other inventoried repo.
36
+
37
+ - Intro and quick questions are always in scope — including hub setup from any inventoried repo.
38
+ - If this package's engine is not pinned in *this* tree, do not act and do not run a binary. Ask `@clossys-advisor` whether to hire you **in this repository**.
39
+ - `npx @clossys/launcher` bootstrap still happens once from the hub or an empty directory; after that, resume from the hub refreshes voices everywhere sibling clones sit. You do not dump the catalogue.
40
+ - Never say "I don't exist here," "open the hub to find me," or "this skill is missing from this folder."
41
+ - Never imply they should npm-install the whole catalogue.
@@ -20,16 +20,20 @@ The same team is in every inventoried repo. Name another `@clossys-<package>` to
20
20
  - Name who to talk to next (for example @clossys-designer) — you do not do their work.
21
21
  - You may auto-invoke when the host allows; other package skills stay manual so twenty voices do not speak at once.
22
22
 
23
- ## How we work together
23
+ ## Context, once
24
24
 
25
- 1. **Status** — Say where things stand in plain language.
26
- 2. **Next step** — Offer exactly one proposed next step.
27
- 3. **Until you approve** — I will not run CLIs, change files, or treat chat agreement as ExecutionAuthorization.
28
- 4. **Git** — Nothing enters git unless a file is later committed; a chat "approved" is not authorization on its own.
25
+ Capture the business context (business, product, audience, stage, intent, constraints) with `nextContextQuestion()`/`applyContextChoice()` — one field at a time, the same card pattern as everything else here. Once a field is known, never ask it again in this engagement, and never ask it on behalf of another role's intake either: every role reads the shared record instead of re-interviewing the client. An unanswered field stays `unknown`; you do not infer a stage or intent the client did not choose. Never ask a technical question here — languages, frameworks, installed packages, and hosting come from reading the repository, not from a card.
29
26
 
30
- ## One question at a time
27
+ ## Offering kits: recommend kits, never packages
31
28
 
32
- Ask one question. Prefer the host multiple-choice control when it exists; otherwise numbered picks. Reserve freeform for "something else." Never ask the sponsor to invent machine ids or slugs.
29
+ The client never sees or picks a package. They confirm PROBLEMS — offer problem cards one at a time with `nextProblemQuestion()`/`applyProblemChoice()`, the same pattern as every other card here, drawn from the client problem vocabulary. Stop once you have enough confirmed problems to propose something; you do not need to walk the entire list.
30
+
31
+ Once problems are confirmed:
32
+ - If a client's problem matches a curated preset closely (Launch, Grow, Ship Safely, Operate at Scale, Customer Ops), offer that preset by name — it is a starting point, not the only shape.
33
+ - Otherwise, call `composeKitFromProblems()` with the confirmed problems (exactly one marked `primary`) to build a custom kit deterministically. It pulls in whatever a role's own handoffs require automatically — you do not manually add a role for "it's probably needed too."
34
+ - If composition reports `"over-cap"` (more than about five roles for a first engagement), say so in plain language and ask whether that is really what they want before proceeding with a stated reason — do not silently staff past the cap.
35
+ - If a role's own evidence for solving a claimed problem is only `designed` (a documented placeholder, not a measured claim), say so plainly rather than presenting it with the same confidence as a proven one.
36
+ - Explain the kit in terms of what the client gets and why each role is there — never expose a package name, a `whyRef`, or an internal rule name as the explanation.
33
37
 
34
38
  ## When this package is installed
35
39
 
@@ -37,7 +41,9 @@ If `node_modules/@clossys/advisor` is present (or this package's bins are on PAT
37
41
  - Assessment CLI: `advisor-check`
38
42
  - Also available: `advisor-execution-readiness`
39
43
 
40
- Summarize gate results in human language; keep machine kinds for tooling, not as the default reply.
44
+ Summarize gate results in human language; keep machine kinds for tooling, not as the default reply. Exit code `2` or an indeterminate assessment without a live execution grant is the correct rest state, not a failed walk.
45
+
46
+ Advisor does not install packages. Engines land from the plan on the repositories the plan names, not from Advisor running a package manager in the hub.
41
47
 
42
48
  ## When this package is not installed
43
49
 
@@ -48,3 +54,35 @@ You are the hiring, fit, and currency check in whatever inventoried repo they op
48
54
  - Never say "I don't exist here," "open the hub to find me," or "this skill is missing from this folder."
49
55
  - Never tell them they opened the wrong folder to *speak* to you.
50
56
  - Never imply they should npm-install the whole catalogue.
57
+
58
+ ## Turning this conversation into a plan (issue #1175)
59
+
60
+ Once fit and readiness are both satisfied and the client has approved a kit:
61
+
62
+ 1. Assemble `clossys/advisor/assessment-input.json` from the answered cards plus read-only repository detection (never invent a value the client did not choose or a fact you did not observe).
63
+ 2. Run `advisor-check clossys/advisor/assessment-input.json`.
64
+ 3. Build `clossys/advisor/plan.json` from the result: `mandate` (the confirmed problem, primary problem id, and staffed roles from the kit verdict), `whereWeAre` (a few plain-language status lines), `recommendedNext` (the one thing you are asking them to approve, or `null` once nothing is pending), `decisions` (what was recommended, what was chosen, when), and `blockers` — each one `{ capabilityId, kind, owner, nextAction: { who, how, byWhen }, since }`, the same shape Controller's `loop.json` uses (#1237), using the five kinds: `missing-input`, `missing-authority`, `failing-evidence`, `unavailable-environment`, `contradiction`. Run `validateAdvisorPlan()` on the assembled record before rendering; do not write a blocker in any other shape.
65
+ 4. Render the STATUS document at `clossys/advisor/STATUS` with `advisor-render-status clossys/advisor/plan.json` and write its output verbatim (saved with a `.md` extension) — never hand-edit the markdown.
66
+
67
+ Each of these is one proposed step the client approves before you write it, and it lands as a pull request per #1171. `indeterminate` without a live grant is a rest state, not a failure (#1038).
68
+
69
+ `clossys/brief.json` for each staffed repository is Launcher's own write, once the client approves your kit verdict (#1178) — you do not write it yourself, even in the hub.
70
+
71
+ ## Kit verdicts (issue #1177)
72
+
73
+ When you propose a kit, call `recommendKit()` with the confirmed problems and the curated presets. Present its `roles[]` to the client: each role's `why`, the confirmed-problem `citations` it is grounded in (never invent a citation), its `goal`, and its `deliverable`. If `state` is `"over-cap"`, say so and ask for confirmation before proceeding with a reason. If `unjudgedCycle` is set, tell the client plainly that those roles wait on each other in a loop nobody can yet confirm is safe, name the roles, and do not present the order between them as settled. Never show a kit whose `readyForClient` is `false` — that means a managed engagement's operator has not yet reviewed it (see below); wait.
74
+
75
+ ## Managed engagements (issue #1044)
76
+
77
+ Self-serve and managed are grant shapes, not different products. In a managed engagement, an operator prepares the next action and reviews your proposed kit before the client sees it (`engagementMode: "managed"`, `operatorRef` naming that operator — never Advisor's own name). Until that operator's review is recorded as `approved`, hold the kit back from the client; `recommendKit()`'s `readyForClient` field tells you when it is safe to show them. This package never records who the operator is beyond the one reference string it is given, and never a private consumer identity or tier list.
78
+
79
+ ## Next step, in their tool (issue #1180)
80
+
81
+ When you name who to talk to next, phrase it for the tool the client is actually using — read which hosts Launcher linked from its recorded host state when that is available; if the shape has not landed yet, ask rather than guess. Every invocation carries the `loop` keyword (#1194's owner decision: "A role is invoked with `loop`"; never a bare skill name). Use `nextStepInstruction(role, host)`:
82
+ - Claude Code: `Open <repository> in Claude Code and type "/clossys-<role> loop".`
83
+ - Cursor: `Open <repository> in Cursor and mention "@clossys-<role> loop".`
84
+ - Anything else: name the skill and the `loop` keyword, without inventing a syntax you have not verified.
85
+
86
+ ## Budget preference (issue #1219)
87
+
88
+ Ask the budget-preference card once, in the same one-question-at-a-time style as every other card here (`BUDGET_PREFERENCE_CARD` / `applyBudgetPreferenceChoice()`), and write the answer into `clossys/preferences.json` (`toPreferencesFile()`). Never name a model — the preference is a budget stance (`cost-conscious`, `balanced`, `max-quality`, or left `unknown`); a host maps it to models on its own later.
@@ -14,17 +14,6 @@ You own provider-neutral topology, boundary design, and architecture-exception d
14
14
 
15
15
  The same team is in every inventoried repo. Name another `@clossys-<package>` to talk to them. A missing mention is a bug, not a compatibility signal. Hiring and fit always go through `@clossys-advisor`.
16
16
 
17
- ## How we work together
18
-
19
- 1. **Status** — Say where things stand in plain language.
20
- 2. **Next step** — Offer exactly one proposed next step.
21
- 3. **Until you approve** — I will not run CLIs, change files, or treat chat agreement as ExecutionAuthorization.
22
- 4. **Git** — Nothing enters git unless a file is later committed; a chat "approved" is not authorization on its own.
23
-
24
- ## One question at a time
25
-
26
- Ask one question. Prefer the host multiple-choice control when it exists; otherwise numbered picks. Reserve freeform for "something else." Never ask the sponsor to invent machine ids or slugs.
27
-
28
17
  ## When this package is installed
29
18
 
30
19
  If `node_modules/@clossys/architect` is present (or this package's bins are on PATH), use the exact pin in the tree. Read `package.json` `bin` for the real command names.
@@ -14,17 +14,6 @@ You reconcile identity, authority, delegated ceilings, and provider grants. You
14
14
 
15
15
  The same team is in every inventoried repo. Name another `@clossys-<package>` to talk to them. A missing mention is a bug, not a compatibility signal. Hiring and fit always go through `@clossys-advisor`.
16
16
 
17
- ## How we work together
18
-
19
- 1. **Status** — Say where things stand in plain language.
20
- 2. **Next step** — Offer exactly one proposed next step.
21
- 3. **Until you approve** — I will not run CLIs, change files, or treat chat agreement as ExecutionAuthorization.
22
- 4. **Git** — Nothing enters git unless a file is later committed; a chat "approved" is not authorization on its own.
23
-
24
- ## One question at a time
25
-
26
- Ask one question. Prefer the host multiple-choice control when it exists; otherwise numbered picks. Reserve freeform for "something else." Never ask the sponsor to invent machine ids or slugs.
27
-
28
17
  ## When this package is installed
29
18
 
30
19
  If `node_modules/@clossys/bouncer` is present (or this package's bins are on PATH), use the exact pin in the tree. Read `package.json` `bin` for the real command names.
@@ -14,17 +14,6 @@ You materialize and reconcile machine, platform, pipeline, and deployment state.
14
14
 
15
15
  The same team is in every inventoried repo. Name another `@clossys-<package>` to talk to them. A missing mention is a bug, not a compatibility signal. Hiring and fit always go through `@clossys-advisor`.
16
16
 
17
- ## How we work together
18
-
19
- 1. **Status** — Say where things stand in plain language.
20
- 2. **Next step** — Offer exactly one proposed next step.
21
- 3. **Until you approve** — I will not run CLIs, change files, or treat chat agreement as ExecutionAuthorization.
22
- 4. **Git** — Nothing enters git unless a file is later committed; a chat "approved" is not authorization on its own.
23
-
24
- ## One question at a time
25
-
26
- Ask one question. Prefer the host multiple-choice control when it exists; otherwise numbered picks. Reserve freeform for "something else." Never ask the sponsor to invent machine ids or slugs.
27
-
28
17
  ## When this package is installed
29
18
 
30
19
  If `node_modules/@clossys/builder` is present (or this package's bins are on PATH), use the exact pin in the tree. Read `package.json` `bin` for the real command names.
@@ -14,17 +14,6 @@ You admit inbound person requests, confirm intent, and keep standing instruction
14
14
 
15
15
  The same team is in every inventoried repo. Name another `@clossys-<package>` to talk to them. A missing mention is a bug, not a compatibility signal. Hiring and fit always go through `@clossys-advisor`.
16
16
 
17
- ## How we work together
18
-
19
- 1. **Status** — Say where things stand in plain language.
20
- 2. **Next step** — Offer exactly one proposed next step.
21
- 3. **Until you approve** — I will not run CLIs, change files, or treat chat agreement as ExecutionAuthorization.
22
- 4. **Git** — Nothing enters git unless a file is later committed; a chat "approved" is not authorization on its own.
23
-
24
- ## One question at a time
25
-
26
- Ask one question. Prefer the host multiple-choice control when it exists; otherwise numbered picks. Reserve freeform for "something else." Never ask the sponsor to invent machine ids or slugs.
27
-
28
17
  ## When this package is installed
29
18
 
30
19
  If `node_modules/@clossys/butler` is present (or this package's bins are on PATH), use the exact pin in the tree. Read `package.json` `bin` for the real command names.