@clossys/launcher 0.1.2 → 0.1.5

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 (55) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +29 -6
  3. package/dist/check-cli.d.ts.map +1 -1
  4. package/dist/check-cli.js +4 -0
  5. package/dist/check-cli.js.map +1 -1
  6. package/dist/cli.d.ts +1 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +8 -5
  9. package/dist/cli.js.map +1 -1
  10. package/dist/core.d.ts +14 -4
  11. package/dist/core.d.ts.map +1 -1
  12. package/dist/core.js +185 -14
  13. package/dist/core.js.map +1 -1
  14. package/dist/host.d.ts.map +1 -1
  15. package/dist/host.js +16 -1
  16. package/dist/host.js.map +1 -1
  17. package/dist/index.d.ts +2 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/skills.d.ts +20 -0
  22. package/dist/skills.d.ts.map +1 -0
  23. package/dist/skills.js +106 -0
  24. package/dist/skills.js.map +1 -0
  25. package/dist/types.d.ts +21 -0
  26. package/dist/types.d.ts.map +1 -1
  27. package/package.json +3 -2
  28. package/skeleton/README.md +11 -21
  29. package/skill-catalogue/advisor/SKILL.md +50 -0
  30. package/skill-catalogue/architect/SKILL.md +42 -0
  31. package/skill-catalogue/bouncer/SKILL.md +43 -0
  32. package/skill-catalogue/builder/SKILL.md +42 -0
  33. package/skill-catalogue/butler/SKILL.md +43 -0
  34. package/skill-catalogue/controller/SKILL.md +42 -0
  35. package/skill-catalogue/designer/SKILL.md +50 -0
  36. package/skill-catalogue/giver/SKILL.md +43 -0
  37. package/skill-catalogue/influencer/SKILL.md +43 -0
  38. package/skill-catalogue/inspector/SKILL.md +42 -0
  39. package/skill-catalogue/integrator/SKILL.md +42 -0
  40. package/skill-catalogue/keeper/SKILL.md +43 -0
  41. package/skill-catalogue/launcher/SKILL.md +53 -0
  42. package/skill-catalogue/locksmith/SKILL.md +42 -0
  43. package/skill-catalogue/messenger/SKILL.md +43 -0
  44. package/skill-catalogue/observer/SKILL.md +42 -0
  45. package/skill-catalogue/publisher/SKILL.md +50 -0
  46. package/skill-catalogue/starter/SKILL.md +48 -0
  47. package/skill-catalogue/strategist/SKILL.md +51 -0
  48. package/skill-catalogue/writer/SKILL.md +51 -0
  49. package/src/check-cli.ts +4 -0
  50. package/src/cli.ts +8 -5
  51. package/src/core.ts +231 -14
  52. package/src/host.ts +14 -1
  53. package/src/index.ts +3 -0
  54. package/src/skills.ts +120 -0
  55. package/src/types.ts +16 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to this package are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.5] - 2026-09-20
9
+
10
+ ### Fixed
11
+
12
+ - Discovery compose skips a `.claude/skills` or `.cursor/skills` path that is already a symlink so it cannot replace composed `SKILL.md`.
13
+
14
+ ## [0.1.4] - 2026-09-19
15
+
16
+ ### Added
17
+
18
+ - Hub apply composes the full `clossys-*` skill tree under `.agents/skills/` on create, appoint, and resume, reading bodies from the packed skill catalogue (built at `npm run build` from each package's skill source) or from a sibling checkout. Missing sources are skipped with a health note; apply continues.
19
+ - The same roster is composed into every inventoried repository clone beside the hub (resolved from the generated hub inventory and confirmed with `git remote get-url origin`); the health report lists targets and skipped ids. Sister checkouts get optional canned `AGENTS.md` only when missing or still the generated sister text.
20
+ - Apply writes host discovery links under `.cursor/skills/` and `.claude/skills/` pointing at the composed skills in the hub and each resolved clone.
21
+ - Packed Agent Skill `clossys-launcher` so a coding agent can be invoked as `@clossys-launcher`.
22
+
23
+ ### Changed
24
+
25
+ - Resume refreshes composed skills and replaces stale generated `AGENTS.md` when it still tells founders to use `npx` to continue the conversation; customized `AGENTS.md` files are left alone.
26
+ - Founder-facing hub guidance (`CONSUMER_AGENTS_MD`, skeleton README) now states the same `@clossys-*` team is available in every inventoried checkout; `@clossys-advisor` is the hiring check; `npx @clossys/launcher` refreshes voices on clones beside the hub.
27
+
8
28
  ## [0.1.2] - 2026-09-19
9
29
 
10
30
  ### Fixed
package/README.md CHANGED
@@ -37,9 +37,29 @@ mapping for `@clossys`. Pin an exact version once you depend on the library
37
37
  API:
38
38
 
39
39
  ```bash
40
- npm install --save-dev --save-exact @clossys/launcher@0.1.2
40
+ npm install --save-dev --save-exact @clossys/launcher@0.1.5
41
41
  ```
42
42
 
43
+ ## Talking to the team
44
+
45
+ First contact is `npx @clossys/launcher` (empty directory or the checkout you
46
+ appoint as the hub). After apply, the launcher composes the same
47
+ `@clossys-<package>` voices into the hub and into every inventoried repository
48
+ checkout that already sits beside the hub (`.agents/skills/clossys-<package>/`
49
+ plus host discovery links). Composition is per checkout, not machine-wide, and
50
+ is not a catalogue dump into `package.json`.
51
+
52
+ Voices are how you talk in a coding agent; they are not engagement engines. The
53
+ `@clossys/advisor` npm package is the engine that grades evidence;
54
+ `@clossys-advisor` in chat is its hiring and compatibility voice. Use
55
+ `@clossys-advisor` and `@clossys-<package>` in the hub or in any inventoried
56
+ product repository. Each voice can talk even when that npm package is not pinned
57
+ in that repo. Launcher health notes missing catalogue sources but apply continues.
58
+
59
+ Run `npx @clossys/launcher` again from the hub for a health report and to
60
+ refresh composed voices on sibling inventoried clones. It does not
61
+ `gh repo clone` missing inventory entries—that is not how you talk to the team.
62
+
43
63
  ## How to run it
44
64
 
45
65
  There is no `--org` flag. Owner is inferred from authenticated `gh` and from
@@ -93,8 +113,10 @@ Exit codes preserve the ternary:
93
113
  | Export | Description |
94
114
  | --- | --- |
95
115
  | `planWorkspace()` | Decides create, resume, or adopt from a cwd observation. Optional `{ inventoryPath }` is the only way to appoint without a populated on-disk inventory. |
96
- | `applyWorkspacePlan()` | Copies the in-package skeleton or hub marker through a host port and returns a `WorkspaceApplyResult` with health. Resume does not write. |
116
+ | `applyWorkspacePlan()` | Copies the in-package skeleton or hub marker through a host port and returns a `WorkspaceApplyResult` with health. Composes the same skill voices on the hub and on inventoried sibling checkouts beside it; refreshes stale hub guidance on every path, including resume. Optional `{ skillCatalogueRoot, launcherPackageRoot }` selects where skill bodies are read. |
97
117
  | `observeWorkspace()` | Reads `gh`, git remotes, cwd, inventory classification, and the public Advisor version. |
118
+ | `readInventoryRepositories()` | Reads repository ids from a `schemaVersion: 1` inventory document. |
119
+ | `launcherPackageRootFromModule()` | Resolves this package's root from `import.meta.url` so apply can find the packed skill catalogue. |
98
120
  | `parseGitHubRemote()` | Parses a github.com remote and rejects any other host. |
99
121
  | `isHubDocument()` | Type guard for the generated hub marker (packed template: `skeleton/.clossys/workspace.json`). |
100
122
  | `inspectInventory()` | Classifies inventory JSON as missing, empty, or populated. |
@@ -105,14 +127,15 @@ Exit codes preserve the ternary:
105
127
  | `DEFAULT_REPOSITORY_NAME` | Default new-hub repository name (`workspace`). Used only when creating, never when appointing. |
106
128
  | `WORKSPACE_MARKER_REL` | Relative path of the hub marker. |
107
129
  | `WORKSPACE_INVENTORY_REL` | Relative path of the hub inventory. |
108
- | `CommandResult` / `CwdObservation` / `DependencyBucket` / `HubDocument` / `HubHealthReport` / `InventoryObservation` / `InventoryValidationEntry` / `InventoryValidationReport` / `PinFinding` / `PinGrade` / `WorkspaceApplyResult` / `WorkspaceDecision` / `WorkspaceHost` / `WorkspaceObservation` / `WorkspacePlan` / `WorkspaceRefusal` / `WorkspaceState` | Typed host, observation, plan, health, and outcome contracts. |
130
+ | `CommandResult` / `CwdObservation` / `DependencyBucket` / `HubDocument` / `HubHealthReport` / `InventoryObservation` / `InventoryValidationEntry` / `InventoryValidationReport` / `PinFinding` / `PinGrade` / `ApplyWorkspaceOptions` / `WorkspaceApplyResult` / `WorkspaceDecision` / `WorkspaceHost` / `WorkspaceObservation` / `WorkspacePlan` / `WorkspaceRefusal` / `WorkspaceState` | Typed host, observation, plan, health, and outcome contracts. |
109
131
 
110
132
  ## Why this is not Advisor, Starter, Builder, installer, creator, or a connector
111
133
 
112
134
  Advisor is the engagement engine: it grades evidence and names a next
113
- action. It has no GitHub I/O, and must not grow any. A remote chat
114
- connector is a separately deployed product surface for that engine, not a
115
- repo scaffolder.
135
+ action. It has no GitHub I/O, and must not grow any. The composed
136
+ `@clossys-advisor` voice is hiring and compatibility in chat, not a second
137
+ engine. A remote chat connector is a separately deployed product surface for
138
+ that engine, not a repo scaffolder.
116
139
 
117
140
  Starter (`@clossys/starter`) is the protected-base **activation** gate.
118
141
  Its only v1 subcommand is `decide`. It joins a pull-request snapshot to
@@ -1 +1 @@
1
- {"version":3,"file":"check-cli.d.ts","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAIV,aAAa,EACb,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,WAAW,uSAM0B,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AAqDrD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAsBrE;AAMD,uEAAuE;AACvE,wBAAgB,YAAY,IAAI,aAAa,CAmB5C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAK7F;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC/B,MAAM,CA4BR"}
1
+ {"version":3,"file":"check-cli.d.ts","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAIV,aAAa,EACb,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,WAAW,uSAM0B,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AAqDrD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAsBrE;AAMD,uEAAuE;AACvE,wBAAgB,YAAY,IAAI,aAAa,CAuB5C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAK7F;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC/B,MAAM,CA4BR"}
package/dist/check-cli.js CHANGED
@@ -96,6 +96,7 @@ export function planningHost() {
96
96
  now: () => "1970-01-01T00:00:00.000Z",
97
97
  exists: () => false,
98
98
  isDirectory: () => false,
99
+ isSymlink: () => false,
99
100
  readText: () => null,
100
101
  writeText: () => {
101
102
  throw new Error("launcher-check does not write");
@@ -103,6 +104,9 @@ export function planningHost() {
103
104
  mkdirp: () => {
104
105
  throw new Error("launcher-check does not write");
105
106
  },
107
+ symlink: () => {
108
+ throw new Error("launcher-check does not write");
109
+ },
106
110
  readDir: () => [],
107
111
  run: () => unused(),
108
112
  prompt: () => null,
@@ -1 +1 @@
1
- {"version":3,"file":"check-cli.js","sourceRoot":"","sources":["../src/check-cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAA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orkspaceHost } from "./types.js";
3
- export declare const USAGE = "Usage: launcher [--inventory <path>]\n\nCreate, resume, or appoint a GitHub repository as the account workspace hub.\n\nRun from an empty directory to create {owner}/workspace. Run from an existing\nhub to resume. Run from any GitHub repository you want to own the account-level\nhub to appoint it \u2014 it does not have to be a new exclusive repo, and it keeps\nits current name and files.\n\nAppointing requires a populated generated hub inventory (packed template\nskeleton/.clossys/inventory.json; the generated path does not ship), or\n--inventory <path> pointing at one. Resume does not write. Create may write\nan empty inventory.\n\nGitHub-only. Owner is inferred from `gh` and git remotes. Public npm reads\nneed no token.\n\nExit codes: 0 = satisfied, 1 = a known refusal, 2 = indeterminate.";
3
+ export declare const USAGE = "Usage: launcher [--inventory <path>]\n\nCreate, resume, or appoint a GitHub repository as the account workspace hub.\n\nRun from an empty directory to create {owner}/workspace. Run from an existing\nhub to resume. Run from any GitHub repository you want to own the account-level\nhub to appoint it \u2014 it does not have to be a new exclusive repo, and it keeps\nits current name and files.\n\nAppointing requires a populated generated hub inventory (packed template\nskeleton/.clossys/inventory.json; the generated path does not ship), or\n--inventory <path> pointing at one. Resume refreshes composed skills and\nstale hub guidance. Create may write an empty inventory.\n\nGitHub-only. Owner is inferred from `gh` and git remotes. Public npm reads\nneed no token.\n\nExit codes: 0 = satisfied, 1 = a known refusal, 2 = indeterminate.";
4
4
  export declare class LauncherInputError extends Error {
5
5
  }
6
6
  export declare function parseLauncherArgs(argv: readonly string[]): {
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,KAAK,uyBAiBiD,CAAC;AAEpE,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAMhD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAKpG;AAED,4FAA4F;AAC5F,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAgC/F;AAYD,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAO3F"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,KAAK,y0BAiBiD,CAAC;AAEpE,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAMhD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAKpG;AAED,4FAA4F;AAC5F,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAkC/F;AAaD,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAO3F"}
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { realpathSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import { applyWorkspacePlan, observeWorkspace, planWorkspace, skeletonRootFromModule } from "./core.js";
5
+ import { applyWorkspacePlan, observeWorkspace, planWorkspace, launcherPackageRootFromModule, skeletonRootFromModule } from "./core.js";
6
6
  import { createNodeHost } from "./host.js";
7
7
  export const USAGE = `Usage: launcher [--inventory <path>]
8
8
 
@@ -15,8 +15,8 @@ its current name and files.
15
15
 
16
16
  Appointing requires a populated generated hub inventory (packed template
17
17
  skeleton/.clossys/inventory.json; the generated path does not ship), or
18
- --inventory <path> pointing at one. Resume does not write. Create may write
19
- an empty inventory.
18
+ --inventory <path> pointing at one. Resume refreshes composed skills and
19
+ stale hub guidance. Create may write an empty inventory.
20
20
 
21
21
  GitHub-only. Owner is inferred from \`gh\` and git remotes. Public npm reads
22
22
  need no token.
@@ -65,14 +65,17 @@ export function main(argv, host, skeletonRoot) {
65
65
  }
66
66
  return 1;
67
67
  }
68
- const result = applyWorkspacePlan(host, decision, skeletonRoot);
68
+ const result = applyWorkspacePlan(host, decision, skeletonRoot, {
69
+ launcherPackageRoot: launcherPackageRootFromModule(import.meta.url),
70
+ });
69
71
  console.log(result.message);
70
72
  return 0;
71
73
  }
72
74
  function run() {
73
75
  try {
74
76
  const host = createNodeHost();
75
- process.exitCode = main(process.argv.slice(2), host, skeletonRootFromModule(import.meta.url));
77
+ const moduleUrl = import.meta.url;
78
+ process.exitCode = main(process.argv.slice(2), host, skeletonRootFromModule(moduleUrl));
76
79
  }
77
80
  catch (cause) {
78
81
  console.error(`launcher: ${cause instanceof Error ? cause.message : String(cause)}`);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;mEAiB8C,CAAC;AAEpE,MAAM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E,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,aAAa,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACrF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,kBAAkB,CAAC,SAAiB,EAAE,QAA4B;IAChF,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAAE,GAAG,EAAE,CAAC"}
package/dist/core.d.ts CHANGED
@@ -1,10 +1,14 @@
1
- import type { HubDocument, HubHealthReport, InventoryObservation, InventoryValidationReport, WorkspaceApplyResult, WorkspaceDecision, WorkspaceHost, WorkspaceObservation, WorkspacePlan } from "./types.js";
1
+ import type { ApplyWorkspaceOptions, HubDocument, HubHealthReport, InventoryObservation, InventoryValidationReport, WorkspaceApplyResult, WorkspaceDecision, WorkspaceHost, WorkspaceObservation, WorkspacePlan } from "./types.js";
2
2
  export declare const DEFAULT_REPOSITORY_NAME = "workspace";
3
3
  export declare const WORKSPACE_MARKER_REL = ".clossys/workspace.json";
4
4
  export declare const WORKSPACE_INVENTORY_REL = ".clossys/inventory.json";
5
5
  export declare const ADVISOR_PACKAGE = "@clossys/advisor";
6
6
  /** Written at generate time so this package never ships a nested AGENTS.md. */
7
- export declare const CONSUMER_AGENTS_MD = "# Account workspace\n\nThis repository is the account hub for Foundry packages. It inventories\nwhere packages are installed and coordinates engagement. It is not a\nproduct application and does not need the whole catalogue installed here.\n\nOpen this folder in your coding agent. Advisor is read-only until you\napprove a next action.\n\nRun `npx @clossys/launcher` again to resume. Public npm reads\nneed no token.\n";
7
+ export declare const CONSUMER_AGENTS_MD = "# Account workspace\n\nThis folder is the account hub for Foundry packages.\n\nAfter `npx @clossys/launcher`, the same `@clossys-*` team is composed in\nevery inventoried checkout beside this hub. Talk with `@clossys-advisor` and\n`@clossys-<package>` here or in a product repository. A missing `@` mention\nis not how we signal incompatibility \u2014 `@clossys-advisor` is the hiring check.\n\nRun `npx @clossys/launcher` again for hub health and to refresh voices on\nclones next to the hub, not as how you talk to packages.\n\nAdvisor is read-only until the sponsor approves a next action.\n";
8
+ /** Canned guidance for inventoried product checkouts (not the hub). */
9
+ export declare const SISTER_CONSUMER_AGENTS_MD = "# Product repository\n\nThis repository is part of the same account engagement. The same\n`@clossys-<package>` team is here for intro and questions;\n`@clossys-advisor` decides hiring and compatibility. This folder is not the\nhub \u2014 engines are hired per repository, not dumped here.\n";
10
+ /** Previous generate-time guidance; used to refresh stale hub AGENTS.md on resume. */
11
+ export declare const LEGACY_CONSUMER_AGENTS_MD = "# Account workspace\n\nThis repository is the account hub for Foundry packages. It inventories\nwhere packages are installed and coordinates engagement. It is not a\nproduct application and does not need the whole catalogue installed here.\n\nOpen this folder in your coding agent. Advisor is read-only until you\napprove a next action.\n\nRun `npx @clossys/launcher` again to resume. Public npm reads\nneed no token.\n";
8
12
  export declare const CONSUMER_CLAUDE_MD = "@AGENTS.md\n";
9
13
  /** Parses a GitHub git remote. Any other host is rejected. */
10
14
  export declare function parseGitHubRemote(url: string): {
@@ -19,6 +23,11 @@ export declare function inspectInventory(raw: string | null): InventoryObservati
19
23
  export declare function hasAdvisorPin(manifest: unknown): boolean;
20
24
  /** Collects GitHub owner, cwd shape, default-hub presence, and the public Advisor pin. */
21
25
  export declare function observeWorkspace(host: WorkspaceHost): WorkspaceObservation;
26
+ /**
27
+ * Decides create, resume, or adopt from a cwd observation.
28
+ * Appointing means: run this from the GitHub repository that should own the hub.
29
+ */
30
+ export declare function readInventoryRepositories(host: WorkspaceHost, source: string, label: string): readonly string[];
22
31
  export declare function planWorkspace(observation: WorkspaceObservation, host: WorkspaceHost, options?: {
23
32
  inventoryPath?: string;
24
33
  }): WorkspaceDecision;
@@ -36,7 +45,8 @@ export declare function formatHubHealth(report: HubHealthReport): string;
36
45
  * a note; marks ids whose check fails as unknown. Never mutates the inventory.
37
46
  */
38
47
  export declare function checkInventoryEntries(host: WorkspaceHost, directory: string): InventoryValidationReport;
39
- /** Applies a create, resume, or adopt plan through the host. Resume does not write. */
40
- export declare function applyWorkspacePlan(host: WorkspaceHost, plan: WorkspacePlan, skeletonRoot: string): WorkspaceApplyResult;
48
+ /** Applies a create, resume, or adopt plan through the host. Resume refreshes composed skills and stale AGENTS.md guidance. */
49
+ export declare function applyWorkspacePlan(host: WorkspaceHost, plan: WorkspacePlan, skeletonRoot: string, options?: ApplyWorkspaceOptions): WorkspaceApplyResult;
50
+ export declare function launcherPackageRootFromModule(moduleUrl: string): string;
41
51
  export declare function skeletonRootFromModule(moduleUrl: string): string;
42
52
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAIV,WAAW,EACX,eAAe,EACf,oBAAoB,EAEpB,yBAAyB,EAEzB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,aAAa,EAGd,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,uBAAuB,cAAc,CAAC;AACnD,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,eAA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AAa,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAa/G;AAkDD,wBAAgB,aAAa,CAC3B,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,aAAa,EACnB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GACvC,iBAAiB,CAgFnB;AA2JD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CA0CpH;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CA2C/D;AAoBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,yBAAyB,CA4BvG;AAgJD,+HAA+H;AAC/H,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,aAAa,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAqDtB;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhE"}
package/dist/core.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { dirname, join, resolve, sep } from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
+ import { composeSkills } from "./skills.js";
3
4
  export const DEFAULT_REPOSITORY_NAME = "workspace";
4
5
  export const WORKSPACE_MARKER_REL = ".clossys/workspace.json";
5
6
  export const WORKSPACE_INVENTORY_REL = ".clossys/inventory.json";
@@ -22,6 +23,29 @@ const SKELETON_FILES = [
22
23
  /** Written at generate time so this package never ships a nested AGENTS.md. */
23
24
  export const CONSUMER_AGENTS_MD = `# Account workspace
24
25
 
26
+ This folder is the account hub for Foundry packages.
27
+
28
+ After \`npx @clossys/launcher\`, the same \`@clossys-*\` team is composed in
29
+ every inventoried checkout beside this hub. Talk with \`@clossys-advisor\` and
30
+ \`@clossys-<package>\` here or in a product repository. A missing \`@\` mention
31
+ is not how we signal incompatibility — \`@clossys-advisor\` is the hiring check.
32
+
33
+ Run \`npx @clossys/launcher\` again for hub health and to refresh voices on
34
+ clones next to the hub, not as how you talk to packages.
35
+
36
+ Advisor is read-only until the sponsor approves a next action.
37
+ `;
38
+ /** Canned guidance for inventoried product checkouts (not the hub). */
39
+ export const SISTER_CONSUMER_AGENTS_MD = `# Product repository
40
+
41
+ This repository is part of the same account engagement. The same
42
+ \`@clossys-<package>\` team is here for intro and questions;
43
+ \`@clossys-advisor\` decides hiring and compatibility. This folder is not the
44
+ hub — engines are hired per repository, not dumped here.
45
+ `;
46
+ /** Previous generate-time guidance; used to refresh stale hub AGENTS.md on resume. */
47
+ export const LEGACY_CONSUMER_AGENTS_MD = `# Account workspace
48
+
25
49
  This repository is the account hub for Foundry packages. It inventories
26
50
  where packages are installed and coordinates engagement. It is not a
27
51
  product application and does not need the whole catalogue installed here.
@@ -278,7 +302,7 @@ function resolveOwner(observation, host) {
278
302
  * Decides create, resume, or adopt from a cwd observation.
279
303
  * Appointing means: run this from the GitHub repository that should own the hub.
280
304
  */
281
- function readInventoryRepositories(host, source, label) {
305
+ export function readInventoryRepositories(host, source, label) {
282
306
  const raw = host.readText(source);
283
307
  if (raw === null)
284
308
  return [];
@@ -411,7 +435,7 @@ function containedPath(root, relativePath) {
411
435
  const resolved = resolve(root, relativePath);
412
436
  const prefix = root.endsWith(sep) ? root : `${root}${sep}`;
413
437
  if (resolved !== root && !resolved.startsWith(prefix)) {
414
- throw new Error(`refusing to write outside the hub directory: ${relativePath}`);
438
+ throw new Error(`refusing to write outside the workspace directory: ${relativePath}`);
415
439
  }
416
440
  return resolved;
417
441
  }
@@ -526,6 +550,9 @@ function adoptHubFiles(host, skeletonRoot, plan) {
526
550
  if (host.readText(join(plan.directory, "AGENTS.md")) === null) {
527
551
  writeSkeletonFile(host, plan.directory, "AGENTS.md", CONSUMER_AGENTS_MD);
528
552
  }
553
+ else {
554
+ writeConsumerAgentsIfNeeded(host, plan.directory);
555
+ }
529
556
  if (host.readText(join(plan.directory, "CLAUDE.md")) === null) {
530
557
  writeSkeletonFile(host, plan.directory, "CLAUDE.md", CONSUMER_CLAUDE_MD);
531
558
  }
@@ -611,6 +638,21 @@ export function formatHubHealth(report) {
611
638
  const inventory = report.inventory.status === "populated" ? `populated (${report.inventory.count})` : report.inventory.status;
612
639
  const findings = report.pinFindings.map((finding) => finding.note !== undefined ? `${finding.bucket} ${finding.note}` : `${finding.bucket} ${finding.grade}`);
613
640
  const findingLine = findings.length === 0 ? "none" : findings.join("; ");
641
+ const skillParts = [];
642
+ if (report.skillComposition !== undefined) {
643
+ skillParts.push(report.skillComposition.composed.length === 0
644
+ ? "skills composed: none"
645
+ : `skills composed: ${report.skillComposition.composed.map((name) => `clossys-${name}`).join(", ")}`);
646
+ for (const skip of report.skillComposition.skipped) {
647
+ skillParts.push(`skill skipped (${skip.packageDir}): ${skip.note}`);
648
+ }
649
+ if (report.skillComposition.rosterTargets !== undefined && report.skillComposition.rosterTargets.length > 0) {
650
+ skillParts.push(`skill roster written: ${report.skillComposition.rosterTargets.join(", ")}`);
651
+ }
652
+ for (const skip of report.skillComposition.rosterSkipped ?? []) {
653
+ skillParts.push(`skill roster skipped (${skip.inventoryId}): ${skip.note}`);
654
+ }
655
+ }
614
656
  return [
615
657
  `hub marker: ${report.marker}`,
616
658
  `inventory: ${inventory}`,
@@ -619,9 +661,21 @@ export function formatHubHealth(report) {
619
661
  `extra @clossys/*: ${extra}`,
620
662
  `pin findings: ${findingLine}`,
621
663
  `degraded: ${report.degraded ? "yes" : "no"}`,
664
+ ...(skillParts.length === 0 ? [] : skillParts),
622
665
  `health: ${JSON.stringify(report)}`,
623
666
  ].join("\n");
624
667
  }
668
+ function withHealth(host, directory, headline, liveAdvisorVersion, skillComposition) {
669
+ const health = {
670
+ ...reportHubHealth(host, directory, liveAdvisorVersion),
671
+ ...(skillComposition === undefined ? {} : { skillComposition }),
672
+ };
673
+ return {
674
+ state: "satisfied",
675
+ message: `${headline}\n${formatHubHealth(health)}`,
676
+ health,
677
+ };
678
+ }
625
679
  /**
626
680
  * Read-only inventory validation: runs `gh repo view --json name` for each
627
681
  * repository id, batched. Tolerates a missing or failing `gh` by skipping with
@@ -656,29 +710,146 @@ export function checkInventoryEntries(host, directory) {
656
710
  }
657
711
  return { entries, skipped: false };
658
712
  }
659
- function withHealth(host, directory, headline, liveAdvisorVersion) {
660
- const health = reportHubHealth(host, directory, liveAdvisorVersion);
661
- return {
662
- state: "satisfied",
663
- message: `${headline}\n${formatHubHealth(health)}`,
664
- health,
665
- };
713
+ function shouldRefreshConsumerAgents(existing) {
714
+ if (existing === null)
715
+ return true;
716
+ if (existing === CONSUMER_AGENTS_MD)
717
+ return false;
718
+ if (existing === LEGACY_CONSUMER_AGENTS_MD)
719
+ return true;
720
+ if (existing.includes("Run `npx @clossys/launcher` again to resume"))
721
+ return true;
722
+ return false;
723
+ }
724
+ function writeConsumerAgentsIfNeeded(host, directory) {
725
+ const existing = host.readText(join(directory, "AGENTS.md"));
726
+ if (!shouldRefreshConsumerAgents(existing))
727
+ return;
728
+ writeSkeletonFile(host, directory, "AGENTS.md", CONSUMER_AGENTS_MD);
729
+ }
730
+ function writeSisterConsumerAgentsIfNeeded(host, directory) {
731
+ const existing = host.readText(join(directory, "AGENTS.md"));
732
+ if (existing !== null && existing.trim() !== "" && existing !== SISTER_CONSUMER_AGENTS_MD)
733
+ return;
734
+ writeSkeletonFile(host, directory, "AGENTS.md", SISTER_CONSUMER_AGENTS_MD);
735
+ }
736
+ const CLONE_NOT_BESIDE_HUB_NOTE = "clone not next to the hub; voices appear here after this repository is cloned beside the hub and launcher resumes";
737
+ function parseInventoryRepositoryId(id, hubOwner) {
738
+ const trimmed = id.trim();
739
+ if (trimmed === "")
740
+ return null;
741
+ if (trimmed.includes("/")) {
742
+ const slash = trimmed.indexOf("/");
743
+ const owner = trimmed.slice(0, slash);
744
+ const repository = trimmed.slice(slash + 1);
745
+ if (!OWNER.test(owner) || !REPO.test(repository))
746
+ return null;
747
+ return { owner, repository };
748
+ }
749
+ if (!REPO.test(trimmed))
750
+ return null;
751
+ return { owner: hubOwner, repository: trimmed };
752
+ }
753
+ function resolveSisterCloneTargets(host, hubDirectory, hubOwner) {
754
+ const parent = dirname(resolve(hubDirectory));
755
+ const hubResolved = resolve(hubDirectory);
756
+ const skipped = [];
757
+ const targets = [];
758
+ const inventoryPath = join(hubDirectory, WORKSPACE_INVENTORY_REL);
759
+ let inventoryIds;
760
+ try {
761
+ inventoryIds = readInventoryRepositories(host, inventoryPath, "the hub inventory");
762
+ }
763
+ catch {
764
+ return { targets: [], skipped: [] };
765
+ }
766
+ for (const id of inventoryIds) {
767
+ if (id === "")
768
+ continue;
769
+ const parsed = parseInventoryRepositoryId(id, hubOwner);
770
+ if (parsed === null) {
771
+ skipped.push({ inventoryId: id, note: "inventory id is not a valid repository slug" });
772
+ continue;
773
+ }
774
+ if (parsed.owner !== hubOwner) {
775
+ skipped.push({ inventoryId: id, note: "other account; not this roster" });
776
+ continue;
777
+ }
778
+ const candidate = join(parent, parsed.repository);
779
+ const candidateResolved = resolve(candidate);
780
+ if (candidateResolved === hubResolved)
781
+ continue;
782
+ if (!host.exists(candidate) || !host.isDirectory(candidate)) {
783
+ skipped.push({ inventoryId: id, note: CLONE_NOT_BESIDE_HUB_NOTE });
784
+ continue;
785
+ }
786
+ if (looksLikeFoundry(host, candidate)) {
787
+ skipped.push({ inventoryId: id, note: "foundry supplier tree; skills are not written here" });
788
+ continue;
789
+ }
790
+ const originResult = host.run("git", ["remote", "get-url", "origin"], { cwd: candidate });
791
+ const originUrl = originResult.status === 0 ? originResult.stdout.trim() : "";
792
+ const remote = originUrl === "" ? null : parseGitHubRemote(originUrl);
793
+ if (remote === null || remote.owner !== parsed.owner || remote.repository !== parsed.repository) {
794
+ skipped.push({ inventoryId: id, note: "git origin does not match inventory id" });
795
+ continue;
796
+ }
797
+ targets.push({ inventoryId: id, directory: candidate });
798
+ }
799
+ return { targets, skipped };
800
+ }
801
+ function hubRosterId(host, hubDirectory, hubOwner, hubRepository) {
802
+ const document = readHub(host, hubDirectory);
803
+ if (document !== undefined)
804
+ return document.repository;
805
+ return `${hubOwner}/${hubRepository}`;
666
806
  }
667
- /** Applies a create, resume, or adopt plan through the host. Resume does not write. */
668
- export function applyWorkspacePlan(host, plan, skeletonRoot) {
807
+ function composeSkillRoster(host, hubDirectory, hubOwner, hubRepository, options) {
808
+ const hubSkill = composeSkills(host, hubDirectory, {
809
+ launcherPackageRoot: options.launcherPackageRoot,
810
+ ...(options.skillCatalogueRoot === undefined ? {} : { skillCatalogueRoot: options.skillCatalogueRoot }),
811
+ });
812
+ writeConsumerAgentsIfNeeded(host, hubDirectory);
813
+ const hubId = hubRosterId(host, hubDirectory, hubOwner, hubRepository);
814
+ const rosterTargets = [hubId];
815
+ const { targets, skipped } = resolveSisterCloneTargets(host, hubDirectory, hubOwner);
816
+ for (const target of targets) {
817
+ composeSkills(host, target.directory, {
818
+ launcherPackageRoot: options.launcherPackageRoot,
819
+ ...(options.skillCatalogueRoot === undefined ? {} : { skillCatalogueRoot: options.skillCatalogueRoot }),
820
+ });
821
+ writeSisterConsumerAgentsIfNeeded(host, target.directory);
822
+ rosterTargets.push(target.inventoryId);
823
+ }
824
+ return { ...hubSkill, rosterTargets, rosterSkipped: skipped };
825
+ }
826
+ function finishHubApply(host, directory, headline, launcherPackageRoot, hubOwner, hubRepository, liveAdvisorVersion, skillCatalogueRoot) {
827
+ const skillComposition = composeSkillRoster(host, directory, hubOwner, hubRepository, {
828
+ launcherPackageRoot,
829
+ ...(skillCatalogueRoot === undefined ? {} : { skillCatalogueRoot }),
830
+ });
831
+ return withHealth(host, directory, headline, liveAdvisorVersion, skillComposition);
832
+ }
833
+ /** Applies a create, resume, or adopt plan through the host. Resume refreshes composed skills and stale AGENTS.md guidance. */
834
+ export function applyWorkspacePlan(host, plan, skeletonRoot, options = {}) {
835
+ const launcherPackageRoot = options.launcherPackageRoot ?? resolve(skeletonRoot, "..");
836
+ const skillCatalogueRoot = options.skillCatalogueRoot;
669
837
  if (plan.action === "resume") {
670
838
  if (plan.clone) {
671
839
  requireZero(host.run("gh", ["repo", "clone", `${plan.owner}/${plan.repository}`, plan.directory]), "gh repo clone");
672
840
  }
673
- return withHealth(host, plan.directory, `resumed ${plan.owner}/${plan.repository} as the account hub\nOpen this folder in your coding agent. Advisor stays read-only until you approve a next action.`);
841
+ return finishHubApply(host, plan.directory, `resumed ${plan.owner}/${plan.repository} as the account hub\nOpen this folder in your coding agent. Advisor stays read-only until you approve a next action.`, launcherPackageRoot, plan.owner, plan.repository, undefined, skillCatalogueRoot);
674
842
  }
675
843
  if (plan.action === "create") {
676
844
  copySkeleton(host, skeletonRoot, plan);
677
845
  requireZero(host.run("gh", ["repo", "create", `${plan.owner}/${plan.repository}`, "--private", "--source", plan.directory, "--remote", "origin", "--push"], { cwd: plan.directory }), "gh repo create");
678
- return withHealth(host, plan.directory, `created ${plan.owner}/${plan.repository} as the account hub\nOpen this folder in your coding agent. Advisor stays read-only until you approve a next action.`, plan.advisorVersion);
846
+ return finishHubApply(host, plan.directory, `created ${plan.owner}/${plan.repository} as the account hub\nOpen this folder in your coding agent. Advisor stays read-only until you approve a next action.`, launcherPackageRoot, plan.owner, plan.repository, plan.advisorVersion, skillCatalogueRoot);
679
847
  }
680
848
  adoptHubFiles(host, skeletonRoot, plan);
681
- return withHealth(host, plan.directory, `appointed ${plan.owner}/${plan.repository} as the account hub\nExisting project files were kept. This hub inventories engagement; it does not install the catalogue into the repo.`, plan.advisorVersion);
849
+ return finishHubApply(host, plan.directory, `appointed ${plan.owner}/${plan.repository} as the account hub\nExisting project files were kept. This hub inventories engagement; it does not install the catalogue into the repo.`, launcherPackageRoot, plan.owner, plan.repository, plan.advisorVersion, skillCatalogueRoot);
850
+ }
851
+ export function launcherPackageRootFromModule(moduleUrl) {
852
+ return resolve(dirname(fileURLToPath(moduleUrl)), "..");
682
853
  }
683
854
  export function skeletonRootFromModule(moduleUrl) {
684
855
  return resolve(dirname(fileURLToPath(moduleUrl)), "..", "skeleton");