@batijs/features 0.0.657 → 0.0.659

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/dist/index.d.ts CHANGED
@@ -1,68 +1,5 @@
1
- import { a as cliFlags, i as Flags, n as categories, o as features, r as categoriesGroups, s as flags, t as CategoryLabels } from "./categories-BP9QFx2m.js";
1
+ import { a as CategoryLabels, i as flags, n as cliFlags, o as categories, r as features, s as categoriesGroups, t as Flags } from "./features-BQpWvtym.js";
2
2
 
3
- //#region src/ai-agents.d.ts
4
- /** The flags in the "AI Agent" category, kept in sync with `features.ts`. */
5
- type AiAgentFlag = Extract<(typeof features)[number], {
6
- category: "AI Agent";
7
- }>["flag"];
8
- declare const aiAgentFlags: ("claude" | "codex" | "gemini" | "cursor" | "copilot")[];
9
- interface AiAgentMeta {
10
- /** Project dir this agent reads skills from. */
11
- skillsDir: string;
12
- /** Project instruction file this agent reads. */
13
- instructionFile: string;
14
- /** One-line `@AGENTS.md` import for agents that can't read AGENTS.md natively; `null` otherwise. */
15
- instructionImport: string | null;
16
- }
17
- /**
18
- * Per-agent skill + instruction-file targets, verified against each agent's docs (SKILLS_PLAN.md §15):
19
- * `.agents/skills` is the cross-tool standard (Codex/Gemini/Cursor/Copilot), only Claude needs
20
- * `.claude/skills`; AGENTS.md is native everywhere except Claude and Gemini, which take an `@`-import.
21
- */
22
- declare const aiAgents: {
23
- readonly claude: {
24
- readonly skillsDir: ".claude/skills";
25
- readonly instructionFile: "CLAUDE.md";
26
- readonly instructionImport: "@AGENTS.md";
27
- };
28
- readonly codex: {
29
- readonly skillsDir: ".agents/skills";
30
- readonly instructionFile: "AGENTS.md";
31
- readonly instructionImport: null;
32
- };
33
- readonly gemini: {
34
- readonly skillsDir: ".agents/skills";
35
- readonly instructionFile: "GEMINI.md";
36
- readonly instructionImport: "@./AGENTS.md";
37
- };
38
- readonly cursor: {
39
- readonly skillsDir: ".agents/skills";
40
- readonly instructionFile: "AGENTS.md";
41
- readonly instructionImport: null;
42
- };
43
- readonly copilot: {
44
- readonly skillsDir: ".agents/skills";
45
- readonly instructionFile: "AGENTS.md";
46
- readonly instructionImport: null;
47
- };
48
- };
49
- /**
50
- * Minimal set of skill directories covering the selected agents (SKILLS_PLAN.md §4) — at most two:
51
- * `.agents/skills` for Codex/Gemini/Cursor/Copilot, `.claude/skills` for Claude.
52
- */
53
- declare function resolveSkillDirs(selected: Iterable<Flags>): string[];
54
- interface InstructionFileTarget {
55
- /** Path relative to the app root. */
56
- path: string;
57
- /** Import directive for a shim; `null` means write the canonical content here. */
58
- import: string | null;
59
- }
60
- /**
61
- * Instruction files for the selected agents (SKILLS_PLAN.md §3): the canonical `AGENTS.md` (always,
62
- * since the shims import it) plus each agent's file, deduped. Empty when no agent is selected.
63
- */
64
- declare function resolveInstructionFiles(selected: Iterable<Flags>): InstructionFileTarget[];
65
- //#endregion
66
3
  //#region src/types.d.ts
67
4
  interface Feature<C = string> {
68
5
  label: string;
@@ -75,11 +12,20 @@ interface Feature<C = string> {
75
12
  spectrum?: "beaten_path" | "bleeding_edge";
76
13
  tagline?: string;
77
14
  links?: FeatureLink[];
78
- /** LLM-friendly docs index (`llms.txt`), referenced in the generated AGENTS.md when this feature is selected. */
79
- llms?: string;
15
+ /**
16
+ * When set, BATI generates one agent skill for this feature: a pointer to `llms` (the live docs),
17
+ * triggered by `description`. Emitted when the feature is in the generated stack — selected, or
18
+ * always-on (`readonly`, like Vike). The body stores no how-to, so it never goes stale; `description`
19
+ * says *when* to read the docs, not *how*, so it doesn't either.
20
+ */
21
+ skill?: {
22
+ description: string;
23
+ llms: string;
24
+ };
80
25
  repo?: string;
81
26
  disabled?: boolean;
82
27
  invisibleCli?: boolean;
28
+ invisibleWeb?: boolean;
83
29
  invisibleDescription?: boolean;
84
30
  readonly?: boolean;
85
31
  selected?: boolean;
@@ -113,10 +59,6 @@ declare class BatiSet extends Set<Flags> {
113
59
  /** Prefix to fetch-and-run a package's binary, for `@latest` (`npx`, `pnpm dlx`, `yarn dlx`, `bunx`). */
114
60
  get pmDlx(): string;
115
61
  get hasServer(): boolean;
116
- /** At least one AI coding agent is selected — gates skill / instruction-file generation. */
117
- get hasAiAgent(): boolean;
118
- /** The selected AI agent flags (subset of claude/codex/gemini/cursor/copilot), in selection order. */
119
- get aiAgents(): Flags[];
120
62
  /** A database engine is selected (SQLite or PostgreSQL). */
121
63
  get hasDatabase(): boolean;
122
64
  /** An ORM or query builder is selected (Drizzle, Kysely or Prisma). */
@@ -133,4 +75,9 @@ declare class BatiSet extends Set<Flags> {
133
75
  get hasPhoton(): boolean;
134
76
  }
135
77
  //#endregion
136
- export { AiAgentFlag, AiAgentMeta, BatiSet, type Category, CategoryLabels, type Feature, type FeatureLink, Flags, InstructionFileTarget, aiAgentFlags, aiAgents, categories, categoriesGroups, cliFlags, features, flags, resolveInstructionFiles, resolveSkillDirs };
78
+ //#region src/skills.d.ts
79
+ /** Skills are written to the cross-tool `.agents/` standard, read by Codex/Gemini/Cursor/Copilot. */
80
+ declare const SKILLS_DIR = ".agents/skills";
81
+ declare const CLAUDE_SKILLS_DIR = ".claude/skills";
82
+ //#endregion
83
+ export { BatiSet, CLAUDE_SKILLS_DIR, type Category, CategoryLabels, type Feature, type FeatureLink, Flags, SKILLS_DIR, categories, categoriesGroups, cliFlags, features, flags };
package/dist/index.js CHANGED
@@ -1,70 +1,4 @@
1
- import { n as features, r as flags, t as cliFlags } from "./features-CStxEDu3.js";
2
- //#region src/ai-agents.ts
3
- const aiAgentFlags = features.filter((f) => f.category === "AI Agent").map((f) => f.flag);
4
- /**
5
- * Per-agent skill + instruction-file targets, verified against each agent's docs (SKILLS_PLAN.md §15):
6
- * `.agents/skills` is the cross-tool standard (Codex/Gemini/Cursor/Copilot), only Claude needs
7
- * `.claude/skills`; AGENTS.md is native everywhere except Claude and Gemini, which take an `@`-import.
8
- */
9
- const aiAgents = {
10
- claude: {
11
- skillsDir: ".claude/skills",
12
- instructionFile: "CLAUDE.md",
13
- instructionImport: "@AGENTS.md"
14
- },
15
- codex: {
16
- skillsDir: ".agents/skills",
17
- instructionFile: "AGENTS.md",
18
- instructionImport: null
19
- },
20
- gemini: {
21
- skillsDir: ".agents/skills",
22
- instructionFile: "GEMINI.md",
23
- instructionImport: "@./AGENTS.md"
24
- },
25
- cursor: {
26
- skillsDir: ".agents/skills",
27
- instructionFile: "AGENTS.md",
28
- instructionImport: null
29
- },
30
- copilot: {
31
- skillsDir: ".agents/skills",
32
- instructionFile: "AGENTS.md",
33
- instructionImport: null
34
- }
35
- };
36
- /**
37
- * Minimal set of skill directories covering the selected agents (SKILLS_PLAN.md §4) — at most two:
38
- * `.agents/skills` for Codex/Gemini/Cursor/Copilot, `.claude/skills` for Claude.
39
- */
40
- function resolveSkillDirs(selected) {
41
- const sel = new Set(selected);
42
- const dirs = /* @__PURE__ */ new Set();
43
- for (const flag of aiAgentFlags) if (sel.has(flag)) dirs.add(aiAgents[flag].skillsDir);
44
- return [...dirs];
45
- }
46
- /**
47
- * Instruction files for the selected agents (SKILLS_PLAN.md §3): the canonical `AGENTS.md` (always,
48
- * since the shims import it) plus each agent's file, deduped. Empty when no agent is selected.
49
- */
50
- function resolveInstructionFiles(selected) {
51
- const sel = new Set(selected);
52
- if (!aiAgentFlags.some((flag) => sel.has(flag))) return [];
53
- const byPath = new Map([["AGENTS.md", {
54
- path: "AGENTS.md",
55
- import: null
56
- }]]);
57
- for (const flag of aiAgentFlags) {
58
- if (!sel.has(flag)) continue;
59
- const { instructionFile, instructionImport } = aiAgents[flag];
60
- byPath.set(instructionFile, {
61
- path: instructionFile,
62
- import: instructionImport
63
- });
64
- }
65
- return [...byPath.values()];
66
- }
67
- //#endregion
1
+ import { n as features, r as flags, t as cliFlags } from "./features-CGdfnf9U.js";
68
2
  //#region src/groups.ts
69
3
  let categoriesGroups = /* @__PURE__ */ function(categoriesGroups) {
70
4
  categoriesGroups["Frontend"] = "Frontend";
@@ -139,10 +73,9 @@ PostgreSQL targets a Postgres server. Selected on its own you get a thin client;
139
73
  },
140
74
  {
141
75
  label: "AI Agent",
142
- multiple: true,
143
76
  group: "Utilities",
144
- description: `Generate agent skills and instruction files (SKILL.md, AGENTS.md, CLAUDE.md, …) tailored to your
145
- selected stack, so AI coding agents understand this project's conventions out of the box. Select every agent you use.`
77
+ description: `Generate agent skills (SKILL.md) for your selected stack each one points AI coding
78
+ agents at the tool's official llms.txt, so they always read current docs.`
146
79
  },
147
80
  {
148
81
  label: "Linter",
@@ -176,7 +109,6 @@ var BatiSet = class extends Set {
176
109
  #servers;
177
110
  #databases;
178
111
  #orm;
179
- #aiAgents;
180
112
  pm;
181
113
  constructor(flags, allFeatures, pm) {
182
114
  super(flags);
@@ -184,7 +116,6 @@ var BatiSet = class extends Set {
184
116
  this.#servers = new Set(allFeatures.filter((f) => f.category === "Server").map((f) => f.flag));
185
117
  this.#databases = new Set(allFeatures.filter((f) => f.category === "Database").map((f) => f.flag));
186
118
  this.#orm = new Set(allFeatures.filter((f) => f.category === "ORM / Query builder").map((f) => f.flag));
187
- this.#aiAgents = new Set(allFeatures.filter((f) => f.category === "AI Agent").map((f) => f.flag));
188
119
  }
189
120
  hasOneOf(a) {
190
121
  for (const x of this) if (a.has(x)) return true;
@@ -215,14 +146,6 @@ var BatiSet = class extends Set {
215
146
  get hasServer() {
216
147
  return this.hasOneOf(this.#servers);
217
148
  }
218
- /** At least one AI coding agent is selected — gates skill / instruction-file generation. */
219
- get hasAiAgent() {
220
- return this.hasOneOf(this.#aiAgents);
221
- }
222
- /** The selected AI agent flags (subset of claude/codex/gemini/cursor/copilot), in selection order. */
223
- get aiAgents() {
224
- return [...this].filter((f) => this.#aiAgents.has(f));
225
- }
226
149
  /** A database engine is selected (SQLite or PostgreSQL). */
227
150
  get hasDatabase() {
228
151
  return this.hasOneOf(this.#databases);
@@ -253,4 +176,9 @@ var BatiSet = class extends Set {
253
176
  }
254
177
  };
255
178
  //#endregion
256
- export { BatiSet, aiAgentFlags, aiAgents, categories, categoriesGroups, cliFlags, features, flags, resolveInstructionFiles, resolveSkillDirs };
179
+ //#region src/skills.ts
180
+ /** Skills are written to the cross-tool `.agents/` standard, read by Codex/Gemini/Cursor/Copilot. */
181
+ const SKILLS_DIR = ".agents/skills";
182
+ const CLAUDE_SKILLS_DIR = ".claude/skills";
183
+ //#endregion
184
+ export { BatiSet, CLAUDE_SKILLS_DIR, SKILLS_DIR, categories, categoriesGroups, cliFlags, features, flags };
package/dist/rules.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as Flags, t as CategoryLabels } from "./categories-BP9QFx2m.js";
1
+ import { a as CategoryLabels, t as Flags } from "./features-BQpWvtym.js";
2
2
 
3
3
  //#region src/rules/enum.d.ts
4
4
  declare enum RulesMessage {
package/dist/rules.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as features, r as flags } from "./features-CStxEDu3.js";
1
+ import { n as features, r as flags } from "./features-CGdfnf9U.js";
2
2
  //#region src/rules/enum.ts
3
3
  let RulesMessage = /* @__PURE__ */ function(RulesMessage) {
4
4
  RulesMessage[RulesMessage["ERROR_AUTH_R_SERVER"] = 0] = "ERROR_AUTH_R_SERVER";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/features",
3
- "version": "0.0.657",
3
+ "version": "0.0.659",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {