oneagent 0.3.0 → 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 (2) hide show
  1. package/dist/index.js +94 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9105,6 +9105,98 @@ var init_src2 = __esm(() => {
9105
9105
  ];
9106
9106
  });
9107
9107
 
9108
+ // src/assets/about-oneagent.ts
9109
+ var ABOUT_ONEAGENT_CONTENT = `---
9110
+ name: about-oneagent
9111
+ description: Explains how AI configuration is managed in this project using oneagent. Use when working with the .oneagent/ directory, adding or modifying rules or skills, or when files like CLAUDE.md, AGENTS.md, .cursor/rules/, or .github/instructions/ are mentioned.
9112
+ applyTo: "**"
9113
+ globs: "**"
9114
+ alwaysApply: true
9115
+ ---
9116
+ # Project AI Configuration — oneagent
9117
+
9118
+ This project uses [oneagent](https://github.com/moskalakamil/oneagent) to manage AI agent configuration.
9119
+ Rules, skills, and instructions are maintained in a single source of truth and automatically distributed to all configured AI agents (Claude, Cursor, Windsurf, OpenCode, Copilot).
9120
+
9121
+ ## Directory Structure
9122
+
9123
+ \`\`\`
9124
+ .oneagent/
9125
+ instructions.md # Main project instructions (source for CLAUDE.md, AGENTS.md, etc.)
9126
+ rules/ # Rules distributed to all configured agents
9127
+ skills/ # Skills distributed as slash commands / agent tools
9128
+ \`\`\`
9129
+
9130
+ > Do NOT edit files in \`.claude/\`, \`.cursor/\`, \`.windsurf/\`, \`.opencode/\`, \`.github/instructions/\` directly.
9131
+ > These are auto-generated or symlinked from \`.oneagent/\` and will be overwritten on next \`oneagent generate\`.
9132
+
9133
+ ## Adding a Rule
9134
+
9135
+ Create a \`.md\` file in \`.oneagent/rules/\`. Each agent reads frontmatter differently — use all relevant fields:
9136
+
9137
+ **Rule that applies to all files (recommended for general guidelines):**
9138
+
9139
+ \`\`\`md
9140
+ ---
9141
+ name: rule-name
9142
+ description: What this rule does and when to use it (used by Cursor and Copilot).
9143
+ applyTo: "**"
9144
+ alwaysApply: true
9145
+ ---
9146
+ # Rule Title
9147
+
9148
+ Rule content here.
9149
+ \`\`\`
9150
+
9151
+ **Rule scoped to specific files:**
9152
+
9153
+ \`\`\`md
9154
+ ---
9155
+ name: rule-name
9156
+ description: What this rule does (used by Cursor and Copilot to decide when to apply it).
9157
+ applyTo: "**/*.ts"
9158
+ globs: "**/*.ts"
9159
+ ---
9160
+ # Rule Title
9161
+
9162
+ Rule content here.
9163
+ \`\`\`
9164
+
9165
+ **Frontmatter fields by agent:**
9166
+
9167
+ | Field | Agent | Purpose |
9168
+ |-------|-------|---------|
9169
+ | \`applyTo\` | Claude Code, Copilot | Glob pattern scoping the rule to matching files |
9170
+ | \`globs\` | Cursor | Glob pattern for file-scoped rules ("Apply to Specific Files" mode) |
9171
+ | \`alwaysApply: true\` | Cursor | Apply to every session regardless of files ("Always Apply" mode) |
9172
+ | \`description\` | Cursor, Copilot | Used by the agent to decide when/whether to apply the rule |
9173
+ | \`name\` | All | Rule identifier |
9174
+
9175
+ > Windsurf and OpenCode ignore frontmatter — the rule body is used as-is.
9176
+
9177
+ Then run \`oneagent generate\` to distribute the rule to all configured agents.
9178
+
9179
+ ## Adding a Skill
9180
+
9181
+ Create a \`.md\` file in \`.oneagent/skills/\`:
9182
+
9183
+ \`\`\`md
9184
+ ---
9185
+ mode: agent # ask | edit | agent
9186
+ description: Short description shown in agent menus
9187
+ ---
9188
+ Skill instructions here.
9189
+ \`\`\`
9190
+
9191
+ Then run \`oneagent generate\` to distribute the skill.
9192
+
9193
+ ## Commands
9194
+
9195
+ - \`oneagent generate\` — sync all rules and skills to agent-specific directories
9196
+ - \`oneagent status\` — verify that all symlinks and generated files are up to date
9197
+ - \`oneagent init\` — initialize oneagent in a project (run once)
9198
+ `;
9199
+
9108
9200
  // src/commands/init.ts
9109
9201
  var exports_init = {};
9110
9202
  __export(exports_init, {
@@ -9232,13 +9324,12 @@ async function resolveTemplate(templateArg) {
9232
9324
  return builtin;
9233
9325
  throw new Error(`Unknown template "${templateArg}". Use one of: ${BUILTIN_TEMPLATE_NAMES.join(", ")} — or a GitHub URL.`);
9234
9326
  }
9235
- var ABOUT_ONEAGENT_RULE_PATH, init_default;
9327
+ var init_default;
9236
9328
  var init_init = __esm(() => {
9237
9329
  init_dist();
9238
9330
  init_dist3();
9239
9331
  init_src();
9240
9332
  init_src2();
9241
- ABOUT_ONEAGENT_RULE_PATH = new URL("../assets/about-oneagent.md", import.meta.url);
9242
9333
  init_default = defineCommand2({
9243
9334
  meta: {
9244
9335
  name: "init",
@@ -9300,7 +9391,7 @@ Add your AI instructions here.
9300
9391
  `;
9301
9392
  await fs12.writeFile(path11.join(root, ".oneagent/instructions.md"), instructionsContent);
9302
9393
  }
9303
- await fs12.copyFile(ABOUT_ONEAGENT_RULE_PATH, path11.join(root, ".oneagent/rules/about-oneagent.md"));
9394
+ await fs12.writeFile(path11.join(root, ".oneagent/rules/about-oneagent.md"), ABOUT_ONEAGENT_CONTENT, "utf-8");
9304
9395
  s.stop("Directory structure created.");
9305
9396
  const commandFiles = await fs12.readdir(path11.join(root, ".oneagent/commands")).catch(() => []);
9306
9397
  if (commandFiles.some((f) => f.endsWith(".md"))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneagent",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "One source of truth for AI agent rules — distributed via symlinks to Claude, Cursor, Windsurf, Copilot, OpenCode",
6
6
  "license": "MIT",