aigent-team 0.1.0 → 0.3.0
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 +203 -23
- package/dist/{chunk-N3RYHWTR.js → chunk-RH4B2QFX.js} +72 -5
- package/dist/cli.js +1084 -167
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/teams/ba/rules.md +26 -0
- package/templates/teams/ba/skills/requirement-validation.md +42 -0
- package/templates/teams/ba/skills/story-decomposition.md +47 -0
- package/templates/teams/be/rules.md +28 -0
- package/templates/teams/be/skills/api-load-test.md +45 -0
- package/templates/teams/be/skills/database-migration.md +50 -0
- package/templates/teams/devops/rules.md +28 -0
- package/templates/teams/devops/skills/health-check.md +61 -0
- package/templates/teams/devops/skills/rollback-procedure.md +56 -0
- package/templates/teams/fe/rules.md +28 -0
- package/templates/teams/fe/skills/analyze-bundle.md +42 -0
- package/templates/teams/fe/skills/component-audit.md +41 -0
- package/templates/teams/lead/rules.md +25 -0
- package/templates/teams/lead/skills/parallel-orchestration.md +46 -0
- package/templates/teams/lead/skills/sprint-review.md +38 -0
- package/templates/teams/qa/rules.md +27 -0
- package/templates/teams/qa/skills/flaky-test-diagnosis.md +50 -0
- package/templates/teams/qa/skills/generate-test-data.md +56 -0
package/README.md
CHANGED
|
@@ -49,9 +49,10 @@ Each agent is a senior-level specialist (8+ years expertise) with deep knowledge
|
|
|
49
49
|
└─────┘ └─────┘ └─────┘ └──────┘ └───────┘
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Each agent has:
|
|
53
|
-
- **
|
|
54
|
-
- **
|
|
52
|
+
Each agent has three layers of knowledge:
|
|
53
|
+
- **Rules** (~30-50 lines) — always loaded, top of context. Hard constraints: scope limits, prohibited actions, escalation triggers, output requirements.
|
|
54
|
+
- **Skill index** (~80-150 lines) — always loaded. Core principles, anti-patterns, decision frameworks, reference + skill catalogs.
|
|
55
|
+
- **Reference files** (3-9 per agent) + **Skill files** (2+ per agent) — loaded on-demand when the task requires deep knowledge or executable procedures.
|
|
55
56
|
|
|
56
57
|
This keeps the always-loaded context slim while providing access to thousands of lines of senior expertise when needed.
|
|
57
58
|
|
|
@@ -80,13 +81,102 @@ Interactive wizard that:
|
|
|
80
81
|
2. Lets you pick which team agents to enable
|
|
81
82
|
3. Creates `aigent-team.config.json`
|
|
82
83
|
|
|
84
|
+
> **Note:** `init` only creates the config file. Run `aigent-team generate` to generate platform configs.
|
|
85
|
+
|
|
83
86
|
### Generate
|
|
84
87
|
|
|
85
88
|
```bash
|
|
86
89
|
npx aigent-team generate
|
|
87
90
|
```
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
When run without flags, an interactive wizard lets you choose:
|
|
93
|
+
- **Generate mode**: Platform configs or Plugin bundle
|
|
94
|
+
- **Scopes**: Agents, Skills, References
|
|
95
|
+
- **Team agents**: which roles to generate
|
|
96
|
+
- **Target platforms**: which platforms to generate for
|
|
97
|
+
|
|
98
|
+
You can also pass flags to skip the wizard:
|
|
99
|
+
|
|
100
|
+
#### Scope filtering
|
|
101
|
+
|
|
102
|
+
Generate only specific output types:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Only agent skill index files (no references or skills)
|
|
106
|
+
npx aigent-team generate --scope agents
|
|
107
|
+
|
|
108
|
+
# Only executable skill files
|
|
109
|
+
npx aigent-team generate --scope skills
|
|
110
|
+
|
|
111
|
+
# Only reference docs
|
|
112
|
+
npx aigent-team generate --scope references
|
|
113
|
+
|
|
114
|
+
# Combine scopes
|
|
115
|
+
npx aigent-team generate --scope agents,skills
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Team filtering
|
|
119
|
+
|
|
120
|
+
Override the config's `teams` array from the CLI:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Generate only for FE and BE agents
|
|
124
|
+
npx aigent-team generate --team fe,be
|
|
125
|
+
|
|
126
|
+
# Combine with scope: only skills for QA
|
|
127
|
+
npx aigent-team generate --scope skills --team qa
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Plugin system
|
|
131
|
+
|
|
132
|
+
Create a self-contained plugin bundle:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Generate plugin bundle
|
|
136
|
+
npx aigent-team generate --scope plugin
|
|
137
|
+
|
|
138
|
+
# Or select "Plugin bundle" in the interactive wizard
|
|
139
|
+
npx aigent-team generate
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This creates a `.aigent-team-plugin/` directory (configurable via `output.pluginDir`) with self-contained per-platform bundles:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
.aigent-team-plugin/
|
|
146
|
+
├── manifest.json # Metadata: version, roles, platforms, agent info
|
|
147
|
+
├── claude-code-plugin/ # Self-contained Claude Code bundle
|
|
148
|
+
│ ├── rules/ # Hub file (CLAUDE.md)
|
|
149
|
+
│ ├── agents/ # Agent skill indexes
|
|
150
|
+
│ ├── skills/{agent}/ # Executable skill files
|
|
151
|
+
│ └── kb/ # References + shared knowledge
|
|
152
|
+
│ ├── {agent}/ # Per-agent reference docs
|
|
153
|
+
│ └── shared/ # Shared knowledge files
|
|
154
|
+
├── cursor-ide-plugin/ # Self-contained Cursor bundle
|
|
155
|
+
│ ├── .cursor-plugin/ # Plugin manifest
|
|
156
|
+
│ ├── rules/ # Shared conventions
|
|
157
|
+
│ ├── agents/ # Agent .mdc files
|
|
158
|
+
│ ├── skills/ # Skill files
|
|
159
|
+
│ └── kb/ # References
|
|
160
|
+
└── ... # Other platform bundles
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Each platform bundle is fully self-contained — all agents, skills, references, and shared knowledge are inside. Users can distribute or install any bundle independently.
|
|
164
|
+
|
|
165
|
+
Install a plugin into a project:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Install plugin — converts to platform-native formats
|
|
169
|
+
npx aigent-team install ./path/to/plugin
|
|
170
|
+
|
|
171
|
+
# Install for specific platform only
|
|
172
|
+
npx aigent-team install ./plugin --platform cursor
|
|
173
|
+
|
|
174
|
+
# Overwrite existing files
|
|
175
|
+
npx aigent-team install ./plugin --force
|
|
176
|
+
|
|
177
|
+
# Uninstall — removes all files installed by the plugin
|
|
178
|
+
npx aigent-team uninstall my-plugin-name
|
|
179
|
+
```
|
|
90
180
|
|
|
91
181
|
### Validate
|
|
92
182
|
|
|
@@ -131,6 +221,7 @@ Create `aigent-team.config.json` (or `.ts` / `.js`) in your project root:
|
|
|
131
221
|
| `teams` | `string[]` | Yes | Agent teams to enable: `lead`, `ba`, `fe`, `be`, `qa`, `devops` |
|
|
132
222
|
| `overrides` | `object` | No | Per-team overrides for `techStack`, `tools`, `globs` |
|
|
133
223
|
| `overrides.<team>.techStack` | `object` | No | Override `languages`, `frameworks`, `libraries`, `buildTools` |
|
|
224
|
+
| `output.pluginDir` | `string` | No | Plugin output directory (default: `.aigent-team-plugin/`) |
|
|
134
225
|
|
|
135
226
|
### Programmatic config
|
|
136
227
|
|
|
@@ -152,11 +243,15 @@ export default defineConfig({
|
|
|
152
243
|
});
|
|
153
244
|
```
|
|
154
245
|
|
|
155
|
-
###
|
|
246
|
+
### CLI flags
|
|
156
247
|
|
|
157
248
|
```bash
|
|
158
|
-
|
|
159
|
-
npx aigent-team generate --
|
|
249
|
+
npx aigent-team generate --platform claude-code # Single platform
|
|
250
|
+
npx aigent-team generate --scope skills # Only skill files
|
|
251
|
+
npx aigent-team generate --team fe,be # Only FE + BE agents
|
|
252
|
+
npx aigent-team generate --scope plugin # Plugin bundle
|
|
253
|
+
npx aigent-team install ./plugin --force # Install plugin
|
|
254
|
+
npx aigent-team uninstall my-app # Remove plugin
|
|
160
255
|
```
|
|
161
256
|
|
|
162
257
|
## Generated output
|
|
@@ -165,40 +260,113 @@ After running `aigent-team generate`, you'll see:
|
|
|
165
260
|
|
|
166
261
|
```
|
|
167
262
|
# Claude Code
|
|
168
|
-
.claude/agents/
|
|
169
|
-
.claude/agents/
|
|
170
|
-
.claude/agents/fe-agent.md
|
|
171
|
-
.claude/agents/fe-agent/references/
|
|
263
|
+
.claude/agents/fe-agent.md # Rules + skill index (always loaded)
|
|
264
|
+
.claude/agents/fe-agent/references/ # Deep reference docs
|
|
172
265
|
├── component-architecture.md
|
|
173
266
|
├── state-management.md
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
├──
|
|
177
|
-
|
|
178
|
-
├── css-styling.md
|
|
179
|
-
├── forms.md
|
|
180
|
-
└── review-checklist.md
|
|
181
|
-
...
|
|
267
|
+
└── ...
|
|
268
|
+
.claude/agents/fe-agent/skills/ # Executable procedures
|
|
269
|
+
├── analyze-bundle.md
|
|
270
|
+
└── component-audit.md
|
|
182
271
|
CLAUDE.md # Agent team overview
|
|
183
272
|
|
|
184
273
|
# Cursor
|
|
185
|
-
.cursor/rules/fe-agent.mdc # Glob-scoped skill
|
|
274
|
+
.cursor/rules/fe-agent.mdc # Glob-scoped skill (includes rules)
|
|
186
275
|
.cursor/rules/fe-refs/ # Glob-scoped references
|
|
187
|
-
|
|
276
|
+
.cursor/rules/fe-skills/ # Glob-scoped skills
|
|
188
277
|
|
|
189
278
|
# Codex
|
|
190
279
|
AGENTS.md # Combined agent doc
|
|
191
280
|
.codex/agents/fe-agent.md # Individual agent
|
|
192
281
|
.codex/agents/fe-agent/references/ # References
|
|
193
|
-
|
|
282
|
+
.codex/agents/fe-agent/skills/ # Skills
|
|
194
283
|
|
|
195
284
|
# Antigravity
|
|
196
285
|
GEMINI.md # Agent overview
|
|
197
286
|
.agents/skills/fe-agent/SKILL.md # Skill file
|
|
198
287
|
.agents/skills/fe-agent/references/ # References
|
|
199
|
-
|
|
288
|
+
.agents/skills/fe-agent/skills/ # Skills
|
|
200
289
|
```
|
|
201
290
|
|
|
291
|
+
## How agents are loaded by each platform
|
|
292
|
+
|
|
293
|
+
After `aigent-team generate`, the files are placed in each platform's expected directories. Here's how each AI tool discovers and uses them:
|
|
294
|
+
|
|
295
|
+
### Claude Code
|
|
296
|
+
|
|
297
|
+
Files in `.claude/agents/` are **automatically available** as specialized agents. Claude Code discovers them on startup.
|
|
298
|
+
|
|
299
|
+
**How to use:**
|
|
300
|
+
```
|
|
301
|
+
# In Claude Code, just ask — it will pick the right agent based on the task
|
|
302
|
+
> Review this React component for accessibility issues
|
|
303
|
+
→ Claude spawns fe-agent, which reads references/accessibility.md
|
|
304
|
+
|
|
305
|
+
# Or explicitly request an agent
|
|
306
|
+
> Use the fe-agent to review my frontend code
|
|
307
|
+
> Ask the qa-agent to write E2E tests for this feature
|
|
308
|
+
|
|
309
|
+
# The Lead agent can orchestrate multiple agents
|
|
310
|
+
> Implement the user registration feature
|
|
311
|
+
→ Lead analyzes → spawns BA (specs) → FE + BE (code) → QA (tests)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
`CLAUDE.md` is loaded as project context automatically — it tells Claude which agents are available.
|
|
315
|
+
|
|
316
|
+
### Cursor
|
|
317
|
+
|
|
318
|
+
Files in `.cursor/rules/` are **loaded automatically** based on frontmatter settings:
|
|
319
|
+
- `alwaysApply: true` → always active (Lead, BA agents)
|
|
320
|
+
- `globs: "**/*.tsx, **/*.ts"` → activated when you open matching files
|
|
321
|
+
|
|
322
|
+
**How it works:** When you open a `.tsx` file, Cursor loads `fe-agent.mdc` automatically. The agent's knowledge applies to Cursor's suggestions, completions, and chat responses. Reference files in `fe-refs/` are also glob-scoped and loaded when relevant.
|
|
323
|
+
|
|
324
|
+
No manual action needed — just open files and use Cursor as normal.
|
|
325
|
+
|
|
326
|
+
### Codex (OpenAI)
|
|
327
|
+
|
|
328
|
+
`AGENTS.md` is **read automatically** as the project instruction file. Individual agents in `.codex/agents/` are available as subagents.
|
|
329
|
+
|
|
330
|
+
**How to use:**
|
|
331
|
+
```
|
|
332
|
+
# Codex reads AGENTS.md on startup for project context
|
|
333
|
+
# Use subagents in conversations:
|
|
334
|
+
> @fe-agent review this component
|
|
335
|
+
> @devops-agent check my Dockerfile
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Antigravity (Google)
|
|
339
|
+
|
|
340
|
+
`GEMINI.md` is loaded as project context. Skills in `.agents/skills/` are **auto-discovered**.
|
|
341
|
+
|
|
342
|
+
**How to use:**
|
|
343
|
+
```
|
|
344
|
+
# Antigravity loads skills from .agents/skills/ automatically
|
|
345
|
+
# Reference the skill by name:
|
|
346
|
+
> Use the fe-agent skill to review this code
|
|
347
|
+
> Run the qa-agent skill to generate tests
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Reference files — on-demand loading
|
|
351
|
+
|
|
352
|
+
Reference files are **not** loaded into context by default (that would bloat the context window). Instead:
|
|
353
|
+
|
|
354
|
+
1. The **skill index** (always loaded) contains a table of available references
|
|
355
|
+
2. When the agent encounters a relevant task, it **reads the reference file** on-demand
|
|
356
|
+
3. Example: FE agent working on forms → reads `references/forms.md` for validation patterns
|
|
357
|
+
|
|
358
|
+
This is why the skill index includes a "When to read" table:
|
|
359
|
+
|
|
360
|
+
```markdown
|
|
361
|
+
| Reference | When to read |
|
|
362
|
+
|-----------|-------------|
|
|
363
|
+
| component-architecture.md | Creating or reviewing components |
|
|
364
|
+
| state-management.md | Choosing state solution |
|
|
365
|
+
| performance.md | Optimizing or auditing performance |
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
The agent decides which references to load based on the task — you don't need to do anything manually.
|
|
369
|
+
|
|
202
370
|
## What to commit
|
|
203
371
|
|
|
204
372
|
Generated files **should be committed** to your repo — they are the actual agent configs your AI tools read. Add this to your workflow:
|
|
@@ -238,6 +406,18 @@ The Lead agent acts as orchestrator. When it receives a task, it:
|
|
|
238
406
|
|
|
239
407
|
This mirrors how a real tech lead operates — delegating to specialists and ensuring alignment.
|
|
240
408
|
|
|
409
|
+
## Documentation
|
|
410
|
+
|
|
411
|
+
| Document | Description |
|
|
412
|
+
|---|---|
|
|
413
|
+
| [Docs Index](docs/INDEX.md) | Entry point for all documentation, version history, RFC tracker |
|
|
414
|
+
| [Architecture](docs/base/architecture.md) | System design, data flow, module map, compiler pattern |
|
|
415
|
+
| [Agent Reference](docs/base/agents.md) | All 6 agents — roles, capabilities, reference file catalog |
|
|
416
|
+
| [Vision & Roadmap](docs/base/vision.md) | Future plans, design principles, platform expansion |
|
|
417
|
+
| [RFC-001: Scope & Plugin](docs/rfcs/rfc-001-generate-scope.md) | `--scope`, `--team`, plugin system design |
|
|
418
|
+
| [Contributing](CONTRIBUTING.md) | Development setup, how to add agents/compilers |
|
|
419
|
+
| [Changelog](CHANGELOG.md) | Release history |
|
|
420
|
+
|
|
241
421
|
## Contributing
|
|
242
422
|
|
|
243
423
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
@@ -4,6 +4,13 @@ import { createRequire } from 'module'; const require = createRequire(import.met
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
var PLATFORMS = ["claude-code", "cursor", "codex", "antigravity"];
|
|
6
6
|
var TEAM_ROLES = ["lead", "ba", "fe", "be", "qa", "devops"];
|
|
7
|
+
var GENERATE_SCOPES = ["all", "agents", "skills", "references", "plugin"];
|
|
8
|
+
var PLUGIN_BUNDLE_DIRS = {
|
|
9
|
+
"claude-code": "claude-code-plugin",
|
|
10
|
+
cursor: "cursor-ide-plugin",
|
|
11
|
+
codex: "codex-plugin",
|
|
12
|
+
antigravity: "antigravity-plugin"
|
|
13
|
+
};
|
|
7
14
|
var TechStackSchema = z.object({
|
|
8
15
|
languages: z.array(z.string()).optional(),
|
|
9
16
|
frameworks: z.array(z.string()).optional(),
|
|
@@ -21,6 +28,7 @@ var AgentOverrideSchema = z.object({
|
|
|
21
28
|
allowed: z.array(z.string()).optional(),
|
|
22
29
|
denied: z.array(z.string()).optional()
|
|
23
30
|
}).optional(),
|
|
31
|
+
rules: z.string().optional(),
|
|
24
32
|
globs: z.array(z.string()).optional()
|
|
25
33
|
});
|
|
26
34
|
var ConfigSchema = z.object({
|
|
@@ -34,7 +42,8 @@ var ConfigSchema = z.object({
|
|
|
34
42
|
architecture: z.string().optional()
|
|
35
43
|
}).optional(),
|
|
36
44
|
output: z.object({
|
|
37
|
-
directory: z.string().optional()
|
|
45
|
+
directory: z.string().optional(),
|
|
46
|
+
pluginDir: z.string().optional()
|
|
38
47
|
}).optional()
|
|
39
48
|
});
|
|
40
49
|
|
|
@@ -112,6 +121,23 @@ function loadReferences(refsDir) {
|
|
|
112
121
|
}
|
|
113
122
|
return refs;
|
|
114
123
|
}
|
|
124
|
+
function loadSkills(skillsDir) {
|
|
125
|
+
if (!existsSync2(skillsDir)) return [];
|
|
126
|
+
const skills = [];
|
|
127
|
+
const files = readdirSync(skillsDir).filter((f) => f.endsWith(".md"));
|
|
128
|
+
for (const file of files) {
|
|
129
|
+
const content = readFileSync2(resolve2(skillsDir, file), "utf-8").trim();
|
|
130
|
+
const id = file.replace(".md", "");
|
|
131
|
+
skills.push({
|
|
132
|
+
id,
|
|
133
|
+
name: id.replace(/-/g, " "),
|
|
134
|
+
description: "",
|
|
135
|
+
trigger: "",
|
|
136
|
+
content
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return skills;
|
|
140
|
+
}
|
|
115
141
|
function loadBuiltinAgent(role) {
|
|
116
142
|
const teamDir = resolve2(TEMPLATES_DIR, "teams", role);
|
|
117
143
|
const agentYaml = readFileSync2(resolve2(teamDir, "agent.yaml"), "utf-8");
|
|
@@ -120,6 +146,8 @@ function loadBuiltinAgent(role) {
|
|
|
120
146
|
const conventions = readIfExists(resolve2(teamDir, "conventions.md"));
|
|
121
147
|
const reviewChecklist = readIfExists(resolve2(teamDir, "review-checklist.md"));
|
|
122
148
|
const references = loadReferences(resolve2(teamDir, "references"));
|
|
149
|
+
const rulesContent = readIfExists(resolve2(teamDir, "rules.md"));
|
|
150
|
+
const skills = loadSkills(resolve2(teamDir, "skills"));
|
|
123
151
|
return {
|
|
124
152
|
id: agentDef.id,
|
|
125
153
|
name: agentDef.name,
|
|
@@ -134,6 +162,8 @@ function loadBuiltinAgent(role) {
|
|
|
134
162
|
workflows: agentDef.workflows || [],
|
|
135
163
|
sharedKnowledge: agentDef.sharedKnowledge || [],
|
|
136
164
|
references,
|
|
165
|
+
rulesContent,
|
|
166
|
+
skills,
|
|
137
167
|
globs: agentDef.globs || []
|
|
138
168
|
};
|
|
139
169
|
}
|
|
@@ -158,9 +188,14 @@ function loadAgents(config, cwd = process.cwd()) {
|
|
|
158
188
|
if (override.conventions && existsSync2(resolve2(cwd, override.conventions))) {
|
|
159
189
|
conventions = readFileSync2(resolve2(cwd, override.conventions), "utf-8").trim();
|
|
160
190
|
}
|
|
191
|
+
let rulesContent = agent.rulesContent;
|
|
192
|
+
if (override.rules && existsSync2(resolve2(cwd, override.rules))) {
|
|
193
|
+
rulesContent = readFileSync2(resolve2(cwd, override.rules), "utf-8").trim();
|
|
194
|
+
}
|
|
161
195
|
agent = deepmerge(agent, {
|
|
162
196
|
...override,
|
|
163
|
-
conventions
|
|
197
|
+
conventions,
|
|
198
|
+
rulesContent
|
|
164
199
|
});
|
|
165
200
|
}
|
|
166
201
|
const localDir = resolve2(cwd, ".aigent-team", "teams", role);
|
|
@@ -171,10 +206,16 @@ function loadAgents(config, cwd = process.cwd()) {
|
|
|
171
206
|
if (localConventions) agent.conventions = localConventions;
|
|
172
207
|
if (localChecklist) agent.reviewChecklist = localChecklist;
|
|
173
208
|
if (localSkill) agent.skillContent = localSkill;
|
|
209
|
+
const localRules = readIfExists(resolve2(localDir, "rules.md"));
|
|
210
|
+
if (localRules) agent.rulesContent = localRules;
|
|
174
211
|
const localRefs = loadReferences(resolve2(localDir, "references"));
|
|
175
212
|
if (localRefs.length) {
|
|
176
213
|
agent.references = [...agent.references, ...localRefs];
|
|
177
214
|
}
|
|
215
|
+
const localSkills = loadSkills(resolve2(localDir, "skills"));
|
|
216
|
+
if (localSkills.length) {
|
|
217
|
+
agent.skills = [...agent.skills, ...localSkills];
|
|
218
|
+
}
|
|
178
219
|
}
|
|
179
220
|
const resolvedShared = [];
|
|
180
221
|
for (const ref of agent.sharedKnowledge) {
|
|
@@ -194,10 +235,30 @@ function loadAgents(config, cwd = process.cwd()) {
|
|
|
194
235
|
|
|
195
236
|
// src/core/template-engine.ts
|
|
196
237
|
function assembleSkillIndex(agent) {
|
|
238
|
+
const parts = [];
|
|
239
|
+
if (agent.rulesContent) {
|
|
240
|
+
parts.push(agent.rulesContent);
|
|
241
|
+
}
|
|
197
242
|
if (agent.skillContent) {
|
|
198
|
-
|
|
243
|
+
parts.push(agent.skillContent);
|
|
244
|
+
} else {
|
|
245
|
+
parts.push(assembleAgentMarkdown(agent));
|
|
199
246
|
}
|
|
200
|
-
|
|
247
|
+
if (agent.skills?.length) {
|
|
248
|
+
const skillLines = agent.skills.map(
|
|
249
|
+
(s) => `| \`${s.id}\` | ${s.name} |`
|
|
250
|
+
);
|
|
251
|
+
parts.push([
|
|
252
|
+
"## Executable Skills",
|
|
253
|
+
"",
|
|
254
|
+
"Load the relevant skill file when performing these procedures:",
|
|
255
|
+
"",
|
|
256
|
+
"| Skill | Name |",
|
|
257
|
+
"|-------|------|",
|
|
258
|
+
...skillLines
|
|
259
|
+
].join("\n"));
|
|
260
|
+
}
|
|
261
|
+
return parts.join("\n\n");
|
|
201
262
|
}
|
|
202
263
|
function assembleAgentMarkdown(agent) {
|
|
203
264
|
const sections = [];
|
|
@@ -254,14 +315,20 @@ ${knowledge}`);
|
|
|
254
315
|
function assembleReference(ref) {
|
|
255
316
|
return ref.content;
|
|
256
317
|
}
|
|
318
|
+
function assembleSkill(skill) {
|
|
319
|
+
return skill.content;
|
|
320
|
+
}
|
|
257
321
|
|
|
258
322
|
export {
|
|
259
323
|
PLATFORMS,
|
|
260
324
|
TEAM_ROLES,
|
|
325
|
+
GENERATE_SCOPES,
|
|
326
|
+
PLUGIN_BUNDLE_DIRS,
|
|
261
327
|
loadConfig,
|
|
262
328
|
configExists,
|
|
263
329
|
loadAgents,
|
|
264
330
|
assembleSkillIndex,
|
|
265
331
|
assembleAgentMarkdown,
|
|
266
|
-
assembleReference
|
|
332
|
+
assembleReference,
|
|
333
|
+
assembleSkill
|
|
267
334
|
};
|