openboot 0.1.4 → 0.1.6

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/README.md CHANGED
@@ -17,6 +17,7 @@ boot down → stop everything
17
17
  boot status → show what's running
18
18
  boot logs → view service logs
19
19
  boot agent init → generate AI agent context for your tools
20
+ boot team set → connect a shared team profile from a git repo
20
21
  ```
21
22
 
22
23
  ## Install
@@ -41,7 +42,7 @@ That's it. Boot detects your Docker services, apps, package manager, env require
41
42
 
42
43
  Boot generates instruction files for AI coding tools — one source of truth, synced to `.cursorrules`, `AGENTS.md`, `CLAUDE.md`, and `.github/copilot-instructions.md`. If those files already exist, Boot uses their content and does not overwrite them (only creates missing targets). Use `--overwrite` to replace existing files.
43
44
 
44
- **Agent only?** You can use Boot just for agent sync: run `boot agent init` (and optionally `boot agent remember` or `--from`); no need to use setup/up/dev. Boot focuses on AI agent files. Editor config (.vscode .zed) and code-hub config (.github .forgejo) are a related "one source, many targets" problem we don't solve yet but planned.
45
+ **Agent only?** You can use Boot just for agent sync: run `boot agent init` (and optionally `boot agent remember` or `--from`); no need to use setup/up/dev. Boot focuses on AI agent files; editor or host config (e.g. .vscode .zed, .github .forgejo) is a related problem we don't solve but planned.
45
46
 
46
47
  ```bash
47
48
  boot agent init # generate from your stack + config
@@ -54,14 +55,35 @@ boot agent status # see what Boot knows about your project
54
55
 
55
56
  Your conventions live in `~/.boot/agent/` and follow you to every project. When you run `boot agent init` in a new repo, your personal patterns are included automatically.
56
57
 
57
- **Teams / company profiles (planned).** We’re exploring a team/company mode for the **whole tool** (setup, docker, env, agent, and general rules like PR formats, no committing keys, run these tests). Profile would live in a git repo and be applied via a git URL that Boot fetches and merges with the project config so everyone uses the same baseline.
58
-
59
58
  Import from another project:
60
59
 
61
60
  ```bash
62
61
  boot agent init --from ~/other-project
63
62
  ```
64
63
 
64
+ ## Team Profiles
65
+
66
+ Share a company-wide baseline across every repo. The team profile lives in a git repo and covers the whole tool — setup commands, env rules, agent conventions, everything. Boot fetches it and merges it under your project config so the team baseline always applies.
67
+
68
+ ```bash
69
+ boot team set git@github.com:company/boot-standards.git # connect
70
+ boot team sync # force-pull latest
71
+ boot team check # CI: verify it's applied
72
+ boot team status # see what's merged
73
+ boot team remove # disconnect
74
+ ```
75
+
76
+ In your `boot.yaml`:
77
+
78
+ ```yaml
79
+ team:
80
+ url: git@github.com:company/boot-standards.git
81
+ required: true # fail if the profile can't be resolved
82
+ branch: main # optional, defaults to main
83
+ ```
84
+
85
+ The team repo contains its own `boot.yaml` with the shared rules. Boot merges it as the base layer: team setup commands run first, env requirements are combined, agent conventions are included (labeled separately), and project-specific fields (apps, docker) always come from the project.
86
+
65
87
  ## Config
66
88
 
67
89
  `boot init` creates a `boot.yaml`:
@@ -98,6 +120,8 @@ agent:
98
120
  conventions:
99
121
  - Use server components by default
100
122
  - All DB access through Prisma
123
+ references:
124
+ - git@github.com:Effect-TS/effect.git
101
125
  targets:
102
126
  - .cursorrules
103
127
  - AGENTS.md
@@ -105,6 +129,19 @@ agent:
105
129
  - .github/copilot-instructions.md
106
130
  ```
107
131
 
132
+ ## References
133
+
134
+ Point your agent context at any git repo. Boot clones it to a global cache, keeps it updated, and includes the README in your agent context so AI tools can answer questions about it.
135
+
136
+ ```yaml
137
+ agent:
138
+ references:
139
+ - git@github.com:Effect-TS/effect.git
140
+ - https://github.com/drizzle-team/drizzle-orm.git
141
+ ```
142
+
143
+ The referenced repos are cloned to `~/.boot/references/` and auto-refreshed. Their READMEs appear in a **References** section in the generated agent markdown.
144
+
108
145
  ## Docs
109
146
 
110
147
  See [DETAILED.md](DETAILED.md) for the full config reference, auto-detection list, and command details.
package/dist/cli.js CHANGED
@@ -12,6 +12,7 @@ const clean_1 = require("./commands/clean");
12
12
  const logs_1 = require("./commands/logs");
13
13
  const dev_1 = require("./commands/dev");
14
14
  const agent_1 = require("./commands/agent");
15
+ const team_1 = require("./commands/team");
15
16
  const update_1 = require("./commands/update");
16
17
  const program = new commander_1.Command();
17
18
  program
@@ -155,5 +156,6 @@ program
155
156
  }
156
157
  });
157
158
  (0, agent_1.registerAgentCommands)(program);
159
+ (0, team_1.registerTeamCommands)(program);
158
160
  program.parse();
159
161
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAAuC;AACvC,4CAAyC;AACzC,sCAAmC;AACnC,0CAAuC;AACvC,8CAA2C;AAC3C,8CAA2C;AAC3C,4CAAyC;AACzC,0CAAuC;AACvC,wCAAqC;AACrC,4CAAyD;AACzD,8CAAuE;AAEvE,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,2FAA2F,CAAC;KACxG,OAAO,CAAC,IAAA,0BAAiB,GAAE,EAAE,eAAe,EAAE,2BAA2B,CAAC,CAAC;AAE9E,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,oDAAoD,CAAC;KACjE,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,WAAI,GAAE,CAAC;IACf,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,6DAA6D,CAAC;KAC1E,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,aAAK,GAAE,CAAC;IAChB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAA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,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,4CAA4C,CAAC;KACzD,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,gBAAO,GAAE,CAAC;IAClB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,uCAAuC,CAAC;KACpD,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,eAAM,GAAE,CAAC;IACjB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,IAAA,6BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,2BAAoB,EAAC,OAAO,CAAC,CAAC;AAE9B,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from "commander";
2
+ /**
3
+ * Register all `boot team` subcommands on the program.
4
+ */
5
+ export declare function registerTeamCommands(program: Command): void;
6
+ //# sourceMappingURL=team.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.d.ts","sourceRoot":"","sources":["../../src/commands/team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmT3D"}
@@ -0,0 +1,307 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.registerTeamCommands = registerTeamCommands;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const yaml = __importStar(require("yaml"));
40
+ const log_1 = require("../lib/log");
41
+ const config_1 = require("../lib/config");
42
+ const team_1 = require("../lib/team");
43
+ /**
44
+ * Register all `boot team` subcommands on the program.
45
+ */
46
+ function registerTeamCommands(program) {
47
+ const team = program
48
+ .command("team")
49
+ .description("Manage team / company profile for shared config");
50
+ // ─────────────────────────────────────────────
51
+ // boot team set <url>
52
+ // ─────────────────────────────────────────────
53
+ team
54
+ .command("set <url>")
55
+ .description("Set the team profile git URL in boot.yaml")
56
+ .option("--branch <branch>", "Branch to track (default: main)")
57
+ .option("--required", "Enforce the team profile (fail if unavailable)")
58
+ .action(async (url, opts) => {
59
+ try {
60
+ const cwd = process.cwd();
61
+ log_1.log.header("boot team set");
62
+ // Find or create boot.yaml
63
+ let configPath = (0, config_1.findConfig)(cwd);
64
+ if (!configPath) {
65
+ configPath = path.join(cwd, "boot.yaml");
66
+ fs.writeFileSync(configPath, yaml.stringify({ name: path.basename(cwd) }, { indent: 2 }));
67
+ log_1.log.success("Created boot.yaml");
68
+ }
69
+ // Read existing content
70
+ const raw = fs.readFileSync(configPath, "utf-8");
71
+ // Build team config
72
+ const teamConfig = { url };
73
+ if (opts.branch)
74
+ teamConfig.branch = opts.branch;
75
+ if (opts.required)
76
+ teamConfig.required = true;
77
+ // Update or append team section
78
+ let newContent;
79
+ if (/^team:/m.test(raw)) {
80
+ // Replace existing team section
81
+ const parsed = yaml.parse(raw) || {};
82
+ parsed.team = teamConfig;
83
+ newContent = yaml.stringify(parsed, { indent: 2, lineWidth: 0 });
84
+ }
85
+ else {
86
+ // Append team section
87
+ const section = yaml.stringify({ team: teamConfig }, { indent: 2, lineWidth: 0 });
88
+ newContent = raw.trimEnd() + "\n\n" + section;
89
+ }
90
+ fs.writeFileSync(configPath, newContent);
91
+ log_1.log.success(`Team profile set: ${url}`);
92
+ // Immediately clone/resolve to verify it works
93
+ log_1.log.blank();
94
+ try {
95
+ const resolved = (0, team_1.resolveTeamProfile)(teamConfig);
96
+ if (resolved) {
97
+ log_1.log.success("Team profile resolved and cached");
98
+ if (resolved.config.agent?.conventions?.length) {
99
+ log_1.log.step(` ${resolved.config.agent.conventions.length} team conventions`);
100
+ }
101
+ if (resolved.config.setup?.length) {
102
+ log_1.log.step(` ${resolved.config.setup.length} team setup commands`);
103
+ }
104
+ if (resolved.config.env?.required?.length) {
105
+ log_1.log.step(` ${resolved.config.env.required.length} required env vars`);
106
+ }
107
+ }
108
+ }
109
+ catch (err) {
110
+ log_1.log.warn(`Could not resolve team profile: ${err.message}`);
111
+ log_1.log.step("The URL has been saved. Fix the issue and run `boot team sync`.");
112
+ }
113
+ log_1.log.blank();
114
+ log_1.log.step("Team profile will be merged into all boot commands.");
115
+ log_1.log.step("Run `boot team sync` to force-pull the latest version.");
116
+ log_1.log.step("Run `boot team status` to see what's applied.");
117
+ log_1.log.blank();
118
+ }
119
+ catch (err) {
120
+ log_1.log.error(err.message);
121
+ process.exit(1);
122
+ }
123
+ });
124
+ // ─────────────────────────────────────────────
125
+ // boot team sync
126
+ // ─────────────────────────────────────────────
127
+ team
128
+ .command("sync")
129
+ .description("Force-pull the latest team profile")
130
+ .action(async () => {
131
+ try {
132
+ const cwd = process.cwd();
133
+ const config = (0, config_1.loadProjectConfig)(cwd);
134
+ if (!config.team?.url) {
135
+ log_1.log.error("No team profile configured.");
136
+ log_1.log.step("Run `boot team set <url>` to configure one.");
137
+ process.exit(1);
138
+ }
139
+ log_1.log.header("boot team sync");
140
+ const resolved = (0, team_1.forceSync)(config.team);
141
+ if (resolved) {
142
+ log_1.log.success("Team profile synced");
143
+ log_1.log.step(` URL: ${resolved.url}`);
144
+ log_1.log.step(` Cache: ${resolved.cacheDir}`);
145
+ }
146
+ else {
147
+ log_1.log.warn("Team profile repo has no boot.yaml — nothing to merge");
148
+ }
149
+ }
150
+ catch (err) {
151
+ log_1.log.error(err.message);
152
+ process.exit(1);
153
+ }
154
+ });
155
+ // ─────────────────────────────────────────────
156
+ // boot team check
157
+ // ─────────────────────────────────────────────
158
+ team
159
+ .command("check")
160
+ .description("Verify the team profile is applied and up to date (CI-friendly)")
161
+ .action(async () => {
162
+ try {
163
+ const cwd = process.cwd();
164
+ const config = (0, config_1.loadProjectConfig)(cwd);
165
+ if (!config.team?.url) {
166
+ // No team profile configured — not an error for check
167
+ log_1.log.info("No team profile configured — nothing to check.");
168
+ return;
169
+ }
170
+ const status = (0, team_1.getTeamStatus)(config.team);
171
+ if (!status.cached) {
172
+ log_1.log.error("Team profile not cached — run `boot team sync`");
173
+ process.exit(1);
174
+ }
175
+ if (!status.hasConfig) {
176
+ log_1.log.error("Team profile repo has no boot.yaml");
177
+ process.exit(1);
178
+ }
179
+ // Try a fetch to check if we're up to date
180
+ try {
181
+ const resolved = (0, team_1.forceSync)(config.team);
182
+ if (resolved) {
183
+ log_1.log.success("Team profile is applied and up to date");
184
+ log_1.log.step(` URL: ${status.url}`);
185
+ log_1.log.step(` Branch: ${status.branch}`);
186
+ }
187
+ }
188
+ catch {
189
+ if (config.team.required) {
190
+ log_1.log.error("Team profile is required but could not be synced");
191
+ process.exit(1);
192
+ }
193
+ log_1.log.warn("Could not verify team profile is up to date (network issue?) — using cached version");
194
+ }
195
+ }
196
+ catch (err) {
197
+ log_1.log.error(err.message);
198
+ process.exit(1);
199
+ }
200
+ });
201
+ // ─────────────────────────────────────────────
202
+ // boot team status
203
+ // ─────────────────────────────────────────────
204
+ team
205
+ .command("status")
206
+ .description("Show team profile status")
207
+ .action(async () => {
208
+ try {
209
+ const cwd = process.cwd();
210
+ const config = (0, config_1.loadProjectConfig)(cwd);
211
+ log_1.log.header("boot team status");
212
+ if (!config.team?.url) {
213
+ log_1.log.info("No team profile configured.");
214
+ log_1.log.step("Run `boot team set <url>` to configure one.");
215
+ return;
216
+ }
217
+ const status = (0, team_1.getTeamStatus)(config.team);
218
+ log_1.log.info(`URL: ${status.url}`);
219
+ log_1.log.info(`Branch: ${status.branch}`);
220
+ log_1.log.info(`Required: ${config.team.required ? "yes" : "no"}`);
221
+ log_1.log.info(`Cached: ${status.cached ? "yes" : "no"}`);
222
+ if (status.lastPull) {
223
+ const ago = timeSince(status.lastPull);
224
+ log_1.log.info(`Last synced: ${ago}`);
225
+ }
226
+ if (status.cached && status.hasConfig) {
227
+ const teamConfig = (0, team_1.loadTeamConfig)(config.team.url);
228
+ if (teamConfig) {
229
+ log_1.log.blank();
230
+ log_1.log.info("Team profile includes:");
231
+ if (teamConfig.setup?.length) {
232
+ log_1.log.step(` ${teamConfig.setup.length} setup command(s)`);
233
+ }
234
+ if (teamConfig.env?.required?.length) {
235
+ log_1.log.step(` ${teamConfig.env.required.length} required env var(s)`);
236
+ }
237
+ if (teamConfig.env?.reject) {
238
+ log_1.log.step(` ${Object.keys(teamConfig.env.reject).length} rejected value rule(s)`);
239
+ }
240
+ if (teamConfig.agent?.conventions?.length) {
241
+ log_1.log.step(` ${teamConfig.agent.conventions.length} agent convention(s)`);
242
+ }
243
+ if (teamConfig.agent?.targets?.length) {
244
+ log_1.log.step(` Targets: ${teamConfig.agent.targets.join(", ")}`);
245
+ }
246
+ }
247
+ }
248
+ else if (status.cached && !status.hasConfig) {
249
+ log_1.log.warn("Team repo is cached but has no boot.yaml — nothing to merge");
250
+ }
251
+ else {
252
+ log_1.log.warn("Team profile not cached — run `boot team sync`");
253
+ }
254
+ }
255
+ catch (err) {
256
+ log_1.log.error(err.message);
257
+ process.exit(1);
258
+ }
259
+ });
260
+ // ─────────────────────────────────────────────
261
+ // boot team remove
262
+ // ─────────────────────────────────────────────
263
+ team
264
+ .command("remove")
265
+ .description("Remove the team profile from boot.yaml and clear the cache")
266
+ .action(async () => {
267
+ try {
268
+ const cwd = process.cwd();
269
+ const configPath = (0, config_1.findConfig)(cwd);
270
+ if (!configPath) {
271
+ log_1.log.error("No boot.yaml found.");
272
+ process.exit(1);
273
+ }
274
+ const config = (0, config_1.loadProjectConfig)(cwd);
275
+ if (!config.team?.url) {
276
+ log_1.log.info("No team profile configured — nothing to remove.");
277
+ return;
278
+ }
279
+ // Clear cache
280
+ (0, team_1.clearCache)(config.team.url);
281
+ // Remove team section from boot.yaml
282
+ const raw = fs.readFileSync(configPath, "utf-8");
283
+ const parsed = yaml.parse(raw) || {};
284
+ delete parsed.team;
285
+ fs.writeFileSync(configPath, yaml.stringify(parsed, { indent: 2, lineWidth: 0 }));
286
+ log_1.log.success("Team profile removed from boot.yaml and cache cleared");
287
+ }
288
+ catch (err) {
289
+ log_1.log.error(err.message);
290
+ process.exit(1);
291
+ }
292
+ });
293
+ }
294
+ // ────────────────────────────────────────────────
295
+ // Helpers
296
+ // ────────────────────────────────────────────────
297
+ function timeSince(date) {
298
+ const seconds = Math.floor((Date.now() - date.getTime()) / 1000);
299
+ if (seconds < 60)
300
+ return "just now";
301
+ if (seconds < 3600)
302
+ return `${Math.floor(seconds / 60)} minute(s) ago`;
303
+ if (seconds < 86400)
304
+ return `${Math.floor(seconds / 3600)} hour(s) ago`;
305
+ return `${Math.floor(seconds / 86400)} day(s) ago`;
306
+ }
307
+ //# sourceMappingURL=team.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.js","sourceRoot":"","sources":["../../src/commands/team.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,oDAmTC;AApUD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA6B;AAC7B,oCAAiC;AACjC,0CAA8D;AAC9D,sCAMqB;AAGrB;;GAEG;AACH,SAAgB,oBAAoB,CAAC,OAAgB;IACnD,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,iDAAiD,CAAC,CAAC;IAElE,gDAAgD;IAChD,sBAAsB;IACtB,gDAAgD;IAChD,IAAI;SACD,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CAAC,2CAA2C,CAAC;SACxD,MAAM,CAAC,mBAAmB,EAAE,iCAAiC,CAAC;SAC9D,MAAM,CAAC,YAAY,EAAE,gDAAgD,CAAC;SACtE,MAAM,CAAC,KAAK,EAAE,GAAW,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;YAC1B,S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AmD;AACnD,UAAU;AACV,mDAAmD;AAEnD,SAAS,SAAS,CAAC,IAAU;IAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IAEjE,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,UAAU,CAAC;IACpC,IAAI,OAAO,GAAG,IAAI;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,gBAAgB,CAAC;IACvE,IAAI,OAAO,GAAG,KAAK;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;IACxE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC;AACrD,CAAC"}
@@ -56,6 +56,8 @@ export declare function saveStackConventions(stackName: string, conventions: str
56
56
  export interface GenerateOptions {
57
57
  /** Include global/personal conventions (default: true) */
58
58
  includeGlobal?: boolean;
59
+ /** Include team conventions as a separate labeled section (default: true) */
60
+ includeTeam?: boolean;
59
61
  }
60
62
  /**
61
63
  * Generate the canonical agent context markdown.
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/lib/agent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOnD,iCAAiC;AACjC,eAAO,MAAM,SAAS,QAAmC,CAAC;AAC1D,eAAO,MAAM,UAAU,QAAgC,CAAC;AACxD,eAAO,MAAM,eAAe,QAAiC,CAAC;AAE9D,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB,UAU7B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,eAAe,UAK3B,CAAC;AAMF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAA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,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,EAAE,EAAE,MAAM,EAAE,CAAA;CAAE,CAwBtD;AAMD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAUzD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CAqBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA6B9D;AAwED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAElD"}
package/dist/lib/agent.js CHANGED
@@ -56,6 +56,7 @@ const path = __importStar(require("path"));
56
56
  const os = __importStar(require("os"));
57
57
  const yaml = __importStar(require("yaml"));
58
58
  const config_1 = require("./config");
59
+ const references_1 = require("./references");
59
60
  // ────────────────────────────────────────────────
60
61
  // Constants
61
62
  // ────────────────────────────────────────────────
@@ -407,14 +408,39 @@ function generateAgentMarkdown(config, cwd, options = {}) {
407
408
  }
408
409
  lines.push("");
409
410
  }
411
+ // ── Team conventions (from team profile, labeled separately) ──
412
+ const includeTeam = options.includeTeam !== false;
413
+ if (includeTeam) {
414
+ const teamConfig = (0, config_1.getTeamConfigSeparately)(cwd);
415
+ if (teamConfig?.agent?.conventions && teamConfig.agent.conventions.length > 0) {
416
+ lines.push("## Team Conventions");
417
+ lines.push("");
418
+ for (const c of teamConfig.agent.conventions) {
419
+ lines.push(`- ${c}`);
420
+ }
421
+ lines.push("");
422
+ }
423
+ }
410
424
  // ── Project conventions (from boot.yaml) ──
425
+ // When a team profile is active, the merged config includes both team + project
426
+ // conventions. Filter out team conventions so they aren't duplicated.
411
427
  if (config.agent?.conventions && config.agent.conventions.length > 0) {
412
- lines.push("## Conventions");
413
- lines.push("");
414
- for (const c of config.agent.conventions) {
415
- lines.push(`- ${c}`);
428
+ let projectConventions = config.agent.conventions;
429
+ if (includeTeam) {
430
+ const teamConfig = (0, config_1.getTeamConfigSeparately)(cwd);
431
+ if (teamConfig?.agent?.conventions) {
432
+ const teamSet = new Set(teamConfig.agent.conventions);
433
+ projectConventions = projectConventions.filter((c) => !teamSet.has(c));
434
+ }
435
+ }
436
+ if (projectConventions.length > 0) {
437
+ lines.push("## Conventions");
438
+ lines.push("");
439
+ for (const c of projectConventions) {
440
+ lines.push(`- ${c}`);
441
+ }
442
+ lines.push("");
416
443
  }
417
- lines.push("");
418
444
  }
419
445
  // ── Global sections ──
420
446
  if (includeGlobal) {
@@ -453,6 +479,32 @@ function generateAgentMarkdown(config, cwd, options = {}) {
453
479
  lines.push("");
454
480
  }
455
481
  }
482
+ // ── References (git repos cloned as context) ──
483
+ if (config.agent?.references && config.agent.references.length > 0) {
484
+ const refs = (0, references_1.resolveAllReferences)(config.agent.references);
485
+ if (refs.length > 0) {
486
+ lines.push("## References");
487
+ lines.push("");
488
+ for (const ref of refs) {
489
+ lines.push(`### ${ref.name}`);
490
+ lines.push("");
491
+ lines.push(`Source: ${ref.url}`);
492
+ lines.push("");
493
+ if (ref.readme) {
494
+ lines.push(ref.readme);
495
+ lines.push("");
496
+ }
497
+ else if (ref.structure) {
498
+ lines.push("Top-level structure:");
499
+ lines.push("");
500
+ for (const entry of ref.structure) {
501
+ lines.push(`- ${entry}`);
502
+ }
503
+ lines.push("");
504
+ }
505
+ }
506
+ }
507
+ }
456
508
  return lines.join("\n").trimEnd() + "\n";
457
509
  }
458
510
  /**