bees-agentic 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +256 -2
- package/assets/cli-banner-plain.txt +6 -0
- package/assets/cli-banner.ansi +17 -0
- package/bin/bees.js +12 -0
- package/package.json +46 -4
- package/packs/core/commands/onboard.md +16 -0
- package/packs/core/pack.yaml +10 -0
- package/packs/core/rules/conventions.md +15 -0
- package/packs/core/skills/project-context/SKILL.md +21 -0
- package/src/adapters/agents-md.js +43 -0
- package/src/adapters/claude.js +41 -0
- package/src/adapters/codex.js +7 -0
- package/src/adapters/copilot.js +26 -0
- package/src/adapters/cursor.js +21 -0
- package/src/adapters/index.js +31 -0
- package/src/adapters/shared.js +3 -0
- package/src/cli.js +270 -0
- package/src/config.js +105 -0
- package/src/detect.js +145 -0
- package/src/frontmatter.js +20 -0
- package/src/markers.js +50 -0
- package/src/packs.js +84 -0
- package/src/sync.js +106 -0
- package/src/ui.js +62 -0
- package/src/util.js +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 nciross
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,257 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="assets/logo.svg" alt="bees logo: a cute robot bee waving from a honeycomb" width="200">
|
|
4
|
+
|
|
5
|
+
# bees
|
|
6
|
+
|
|
7
|
+
<h3>One hive, every agent.</h3>
|
|
8
|
+
|
|
9
|
+
**A reusable, team-shareable agentic dev environment — install it into any existing project and every teammate gets the same skills, agents, rules and guardrails, whatever AI tool they use.**
|
|
10
|
+
|
|
11
|
+
[](https://github.com/nciross/bees-agentic-template/actions/workflows/ci.yml)
|
|
12
|
+
[](https://www.npmjs.com/package/bees-agentic)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
[](#-contributing)
|
|
15
|
+
[](#-roadmap)
|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
[Why bees](#-why-bees) · [How it works](#-how-it-works) · [Packs](#-packs) · [Memory](#-elephant---goldfish--memory-that-scales) · [The hive](#-meet-the-hive) · [Quick start](#-quick-start) · [Team sharing](#-share-it-with-your-team) · [Roadmap](#-roadmap)
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
> [!NOTE]
|
|
26
|
+
> **bees is in early preview.** The CLI (`init`, `sync`, `add`, `remove`, `doctor`) and the `core` pack work today for all four tools; the other packs land pull request by pull request — see the [roadmap](#-roadmap).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🍯 Why bees?
|
|
31
|
+
|
|
32
|
+
Every developer on a team ends up hand-tuning their own AI setup: a different `CLAUDE.md`, a few copied Cursor rules, a half-maintained Copilot prompt folder. The result is a **swarm without a hive** — inconsistent code, duplicated effort, and security rules that only some agents follow.
|
|
33
|
+
|
|
34
|
+
**bees** fixes that:
|
|
35
|
+
|
|
36
|
+
- 🏠 **One source of truth** — skills, agents, commands, rules and hooks are written once, as portable [Agent Skills](https://agentskills.io) (`SKILL.md`) plus a small `pack.yaml`.
|
|
37
|
+
- 🔌 **Drop-in for existing projects** — `bees init` detects your stack and wires everything in. No rewrite, no new framework.
|
|
38
|
+
- 🤝 **Every tool, same behaviour** — native configs are generated for **Claude Code, GitHub Copilot, Cursor and Codex**, plus a shared `AGENTS.md`.
|
|
39
|
+
- 👥 **Team-shareable by default** — commit `bees.yaml`; teammates are prompted to install the same setup automatically.
|
|
40
|
+
- 📌 **Upstream, pinned** — best-in-class community packs (Impeccable, GitHub Spec Kit, security skills) are installed from their official sources at pinned versions — never copied, never drifting.
|
|
41
|
+
- ♻️ **Safe re-syncs** — bees only touches content between `<!-- bees:begin -->` / `<!-- bees:end -->` markers. Your own edits are preserved.
|
|
42
|
+
|
|
43
|
+
## 🧭 How it works
|
|
44
|
+
|
|
45
|
+
```mermaid
|
|
46
|
+
flowchart LR
|
|
47
|
+
subgraph Hive["🐝 bees (this repo)"]
|
|
48
|
+
P1[core]:::pack
|
|
49
|
+
P2[design]:::pack
|
|
50
|
+
P3[spec]:::pack
|
|
51
|
+
P4[security]:::pack
|
|
52
|
+
P5[quality · testing · git-flow · docs]:::pack
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
CFG["bees.yaml<br/>(committed in your project)"] --> CLI
|
|
56
|
+
Hive --> CLI(("bees CLI<br/>init · sync · doctor"))
|
|
57
|
+
|
|
58
|
+
CLI --> A1["Claude Code<br/>.claude/ · CLAUDE.md"]
|
|
59
|
+
CLI --> A2["Copilot<br/>.github/copilot-instructions.md<br/>.github/prompts/"]
|
|
60
|
+
CLI --> A3["Cursor<br/>.cursor/rules/*.mdc"]
|
|
61
|
+
CLI --> A4["Codex<br/>AGENTS.md · skills"]
|
|
62
|
+
CLI --> UP["Upstream installers<br/>Impeccable · Spec Kit"]
|
|
63
|
+
|
|
64
|
+
classDef pack fill:#ffd43b,stroke:#e8a400,color:#1a1a1a
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
1. **Packs** live in this repo: each one is a folder of `SKILL.md` skills, agents, commands, rules and hooks, described by a `pack.yaml`.
|
|
68
|
+
2. **Your project** declares which tools and packs it wants in `bees.yaml`.
|
|
69
|
+
3. **The bees CLI** renders every pack through a per-tool **adapter** and calls official upstream installers for third-party packs.
|
|
70
|
+
4. **CI** runs `bees sync --check` so generated configs never go stale.
|
|
71
|
+
|
|
72
|
+
## 🧩 Packs
|
|
73
|
+
|
|
74
|
+
| Pack | What you get | Source |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| 🐝 **core** | Shared `AGENTS.md` conventions, project-context skill, sane permissions | bees |
|
|
77
|
+
| 🎨 **design** | Frontend design fluency, anti-generic-UI guidance, design-token rules | [Impeccable](https://github.com/pbakaus/impeccable) (pinned) + bees glue |
|
|
78
|
+
| 📐 **spec** | Spec-driven development: constitution → spec → plan → tasks → implement | [GitHub Spec Kit](https://github.com/github/spec-kit) (pinned) + bees glue |
|
|
79
|
+
| 🛡️ **security** | Secure-coding & threat-model (STRIDE) skills, dependency audit, secret-blocking hook, `/security-review` | bees + optional pinned upstream security skills |
|
|
80
|
+
| ✅ **quality** | Code-review agent, `/review` command, lint/format after every edit | bees |
|
|
81
|
+
| 🧪 **testing** | Test-writer agent, TDD workflow skill | bees |
|
|
82
|
+
| 🌿 **git-flow** | GitHub flow commands: branch → conventional commit → PR | bees |
|
|
83
|
+
| 📚 **docs** | README, ADR and changelog skills | bees |
|
|
84
|
+
| 🐘🐟 **memory** | Elephant (long-term team memory in git) + Goldfish (short-term session memory, summarized then forgotten) | bees |
|
|
85
|
+
| 👥 **team** | A named crew of agents — tech lead, architect, developer, designer, reviewer, security, QA, writer, token optimizer | bees |
|
|
86
|
+
|
|
87
|
+
### Supported tools
|
|
88
|
+
|
|
89
|
+
| | Claude Code | GitHub Copilot | Cursor | Codex |
|
|
90
|
+
|---|:-:|:-:|:-:|:-:|
|
|
91
|
+
| Shared rules (`AGENTS.md`) | ✅ | ✅ | ✅ | ✅ |
|
|
92
|
+
| Skills (`SKILL.md`) | ✅ | ✅ | ✅ | ✅ |
|
|
93
|
+
| Commands / prompts | ✅ | ✅ | ✅ | ✅ |
|
|
94
|
+
| Sub-agents | ✅ | ✅ | ➖ | ➖ |
|
|
95
|
+
| Hooks (guardrails) | ✅ | ➖ | ✅ | ➖ |
|
|
96
|
+
| Plugin marketplace | ✅ | ➖ | ➖ | ➖ |
|
|
97
|
+
|
|
98
|
+
<sub>✅ native · ➖ not available in the tool; bees falls back to rules in `AGENTS.md`.</sub>
|
|
99
|
+
|
|
100
|
+
## 🐘 Elephant & 🐟 Goldfish — memory that scales
|
|
101
|
+
|
|
102
|
+
Agents forget everything between sessions — or remember too much and burn tokens. bees splits memory in two:
|
|
103
|
+
|
|
104
|
+
| | 🐘 **Elephant** — never forgets | 🐟 **Goldfish** — forgets on purpose |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| **What** | Decisions, conventions, lessons learned, glossary | What happened in *this* session |
|
|
107
|
+
| **Where** | `.bees/memory/` — committed, reviewed, shared with the whole team | `.bees/goldfish/` — gitignored, local |
|
|
108
|
+
| **Lifetime** | Forever (until compacted) | One session → a short handoff note |
|
|
109
|
+
| **Token cost** | Only a tiny index is always loaded; entries are pulled on demand | Near zero — summarized, then dropped |
|
|
110
|
+
|
|
111
|
+
A goldfish note that keeps coming back gets **promoted** to elephant memory through a normal pull request — so knowledge grows with review, not by accident.
|
|
112
|
+
|
|
113
|
+
## 👥 Meet the hive
|
|
114
|
+
|
|
115
|
+
bees ships a crew of specialised agents. Each has a name and a role, and writes issues, reviews and PR comments **like a human teammate would** — clear, friendly, to the point.
|
|
116
|
+
|
|
117
|
+
| | Agent | Role | Typical work |
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| 👑 | **Maya** | Tech Lead | Breaks work into tasks, routes them to the right agent, final go/no-go |
|
|
120
|
+
| 🏛️ | **Omar** | Architect | System design, ADRs, trade-off analysis |
|
|
121
|
+
| 🛠️ | **Sam** | Developer | Implements features test-first |
|
|
122
|
+
| 🎨 | **Lina** | Designer | UI/UX with Impeccable, design tokens, accessibility |
|
|
123
|
+
| 🔍 | **Kenji** | Reviewer | Code review with actionable, kind comments |
|
|
124
|
+
| 🛡️ | **Aisha** | Security Engineer | Threat models, secure-coding review, dependency audit |
|
|
125
|
+
| 🧪 | **Leo** | QA Engineer | Test plans, edge cases, regression checks |
|
|
126
|
+
| ✍️ | **Nora** | Writer | Issues, PR descriptions, docs, changelogs |
|
|
127
|
+
| 🪙 | **Theo** | Token Optimizer | Context budgets, model routing, memory compaction |
|
|
128
|
+
|
|
129
|
+
Rename them, drop some, or add your own in `bees.yaml`.
|
|
130
|
+
|
|
131
|
+
> [!NOTE]
|
|
132
|
+
> **Humans stay in control.** Agents *draft* issues and comments into `.bees/drafts/`; nothing is posted to GitHub until a human approves. Every post ends with a small signature — `— Maya, Tech Lead · bees agent 🐝` — so readers always know an agent wrote it.
|
|
133
|
+
|
|
134
|
+
## 🚀 Quick start
|
|
135
|
+
|
|
136
|
+
Requires **Node.js 22+**. Your project can be in any language.
|
|
137
|
+
|
|
138
|
+
### Option A: any tool, with the CLI
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
cd your-existing-project
|
|
142
|
+
npx github:nciross/bees-agentic-template init # pick tools + packs interactively
|
|
143
|
+
git status # review what bees generated
|
|
144
|
+
git add -A && git commit -m "chore: add bees agentic dev environment"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Prefer a permanent `bees` command? `npm install -g github:nciross/bees-agentic-template`. Every install option (global, dev dependency, from source, CI) is in **[docs/install.md](docs/install.md)**.
|
|
148
|
+
|
|
149
|
+
> [!WARNING]
|
|
150
|
+
> The npm package is `bees-agentic`, not `bees` (that name belongs to an unrelated package). Never run `npx bees`.
|
|
151
|
+
|
|
152
|
+
### Option B: Claude Code only, as a plugin marketplace
|
|
153
|
+
|
|
154
|
+
> Coming with the plugin marketplace milestone (see the [roadmap](#-roadmap)).
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
/plugin marketplace add nciross/bees-agentic-template
|
|
158
|
+
/plugin install bees-security@bees
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Everyday commands
|
|
162
|
+
|
|
163
|
+
| Command | What it does |
|
|
164
|
+
|---|---|
|
|
165
|
+
| `bees init` | Detect stack, choose tools & packs, write `bees.yaml`, generate configs |
|
|
166
|
+
| `bees sync` | Re-generate configs (idempotent, preserves your edits) |
|
|
167
|
+
| `bees sync --check` | Fail if configs are stale — use it in CI |
|
|
168
|
+
| `bees add <pack>` / `bees remove <pack>` | Enable or disable a pack |
|
|
169
|
+
| `bees list` | List available packs |
|
|
170
|
+
| `bees doctor` | Diagnose drift and broken markers |
|
|
171
|
+
| `bees update` | Bump pinned upstream versions *(coming with upstream packs)* |
|
|
172
|
+
|
|
173
|
+
### Test it on your project first
|
|
174
|
+
|
|
175
|
+
Not ready to touch your repo? Run bees against a disposable copy and get a checklist of what works:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
git clone https://github.com/nciross/bees-agentic-template && cd bees-agentic-template && npm install
|
|
179
|
+
npm run test:real -- ../your-project # or a git URL
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Your project is never modified. See **[docs/testing.md](docs/testing.md)** for the unit, end-to-end and real-project test suites.
|
|
183
|
+
|
|
184
|
+
## ⚙️ Configuration
|
|
185
|
+
|
|
186
|
+
The full target format is shown below; today only the `core` pack ships, and `team` / `overrides` are reserved for upcoming packs.
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
# bees.yaml — committed to your project
|
|
190
|
+
version: 1
|
|
191
|
+
tools: [claude, copilot, cursor, codex]
|
|
192
|
+
packs:
|
|
193
|
+
- core
|
|
194
|
+
- design # Impeccable, pinned
|
|
195
|
+
- spec # GitHub Spec Kit, pinned
|
|
196
|
+
- security
|
|
197
|
+
- quality
|
|
198
|
+
- testing
|
|
199
|
+
- git-flow
|
|
200
|
+
- docs
|
|
201
|
+
- memory # 🐘 elephant + 🐟 goldfish
|
|
202
|
+
- team
|
|
203
|
+
team:
|
|
204
|
+
tech-lead: { name: Maya }
|
|
205
|
+
designer: { name: Lina }
|
|
206
|
+
writer: { name: Nora, post: draft } # draft → human approves → gh posts
|
|
207
|
+
token-optimizer:
|
|
208
|
+
name: Theo
|
|
209
|
+
budgets: { agents-md: 2000, skill: 1500 } # tokens
|
|
210
|
+
overrides:
|
|
211
|
+
security:
|
|
212
|
+
block-paths: [".env*", "secrets/**"]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## 👥 Share it with your team
|
|
216
|
+
|
|
217
|
+
1. One person runs `bees init` and opens a PR.
|
|
218
|
+
2. The PR adds `bees.yaml`, `bees.lock` and the generated configs.
|
|
219
|
+
3. After merge, every teammate gets the same setup in whichever tool they use — Claude Code users are even prompted to install the bees plugins automatically via the committed `.claude/settings.json`.
|
|
220
|
+
4. Need something project-specific? Write it **outside** the bees markers — `bees sync` will never overwrite it.
|
|
221
|
+
|
|
222
|
+
## 📍 Roadmap
|
|
223
|
+
|
|
224
|
+
- [x] Repository, README & MIT license
|
|
225
|
+
- [x] Repo hygiene: contributing guide, security policy, templates, CI
|
|
226
|
+
- [x] ADR 0001: install scopes (user · project · local)
|
|
227
|
+
- [x] Pack format, `core` pack, `AGENTS.md` generation
|
|
228
|
+
- [x] CLI core: `init`, `sync`, `--check`, `add`, `remove`, `doctor`
|
|
229
|
+
- [x] Adapters: Claude Code, Copilot, Cursor, Codex
|
|
230
|
+
- [x] Tests: unit, end-to-end fixtures, real-project runner
|
|
231
|
+
- [ ] Pack JSON schemas, user/local scopes (ADR 0001), Claude Code plugin marketplace
|
|
232
|
+
- [ ] Packs: design (Impeccable), spec (Spec Kit), security
|
|
233
|
+
- [ ] Packs: quality, testing, git-flow, docs
|
|
234
|
+
- [ ] Pack: memory — 🐘 elephant & 🐟 goldfish
|
|
235
|
+
- [ ] Pack: team — named agents, draft → approve → post workflow
|
|
236
|
+
- [ ] **v0.1.0** release on npm as `bees-agentic`
|
|
237
|
+
|
|
238
|
+
## 🤝 Contributing
|
|
239
|
+
|
|
240
|
+
bees uses **[GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow)**:
|
|
241
|
+
|
|
242
|
+
1. Branch from `main` (`feat/…`, `fix/…`, `docs/…`, `chore/…`).
|
|
243
|
+
2. Commit using [Conventional Commits](https://www.conventionalcommits.org/).
|
|
244
|
+
3. Open a pull request — CI must pass before merge.
|
|
245
|
+
4. `main` is always releasable.
|
|
246
|
+
|
|
247
|
+
New pack ideas are very welcome — open a [new pack proposal](https://github.com/nciross/bees-agentic-template/issues/new?template=new_pack.yml). See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide and [docs/adr/](docs/adr/) for architecture decisions.
|
|
248
|
+
|
|
249
|
+
## 🙏 Credits
|
|
250
|
+
|
|
251
|
+
bees stands on the shoulders of great open-source work: [Impeccable](https://github.com/pbakaus/impeccable), [GitHub Spec Kit](https://github.com/github/spec-kit), and the [Agent Skills](https://agentskills.io) open standard. Third-party packs are installed from their upstream sources and remain under their own licenses.
|
|
252
|
+
|
|
253
|
+
## 📄 License
|
|
254
|
+
|
|
255
|
+
[MIT](LICENSE) © 2026 nciross
|
|
256
|
+
|
|
257
|
+
<div align="center"><sub>Built by humans and their agents, buzzing together. 🐝</sub></div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[0m [0m [0m [0m [0m [0m [0m [0m[38;2;57;142;139m▄[38;2;55;136;133m[48;2;77;241;254m▀[0m[38;2;55;136;133m▄[0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;55;135;133m▄[38;2;55;135;133m[48;2;78;240;252m▀[0m[38;2;57;142;139m▄[0m
|
|
2
|
+
[0m [0m [0m [0m [0m [0m [0m [0m[38;2;46;118;118m▀[0m[38;2;63;165;163m▀[0m[38;2;53;118;112m▀[0m[38;2;26;17;0m▄[0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;26;17;0m▄[0m[38;2;53;118;112m▀[0m[38;2;63;164;163m▀[0m[38;2;44;112;112m▀[0m
|
|
3
|
+
[0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;47;37;8m▄[0m[38;2;72;57;12m▄[0m[38;2;68;54;12m▄[0m[38;2;68;54;12m▄[0m[38;2;68;54;12m▄[0m[38;2;68;54;12m▄[0m[38;2;68;54;12m▄[0m[38;2;68;54;12m▄[0m[38;2;72;56;12m▄[0m[38;2;46;38;9m▄[0m
|
|
4
|
+
[0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;69;54;11m▄[38;2;79;64;15m[48;2;248;210;61m▀[38;2;224;194;74m[48;2;240;203;59m▀[38;2;251;226;120m[48;2;145;125;44m▀[38;2;255;229;121m[48;2;102;91;43m▀[38;2;255;229;121m[48;2;99;88;40m▀[38;2;255;220;70m[48;2;99;88;40m▀[38;2;255;220;70m[48;2;99;88;40m▀[38;2;255;220;70m[48;2;99;88;40m▀[38;2;255;220;70m[48;2;104;91;42m▀[38;2;250;215;69m[48;2;146;125;44m▀[38;2;221;189;59m[48;2;240;202;59m▀[38;2;79;63;15m[48;2;245;208;60m▀[0m[38;2;69;55;11m▄[0m [0m [0m [0m [0m [0m [0m [0m [0m [38;2;255;195;0m██ [0m
|
|
5
|
+
[0m [0m [0m [0m [0m [0m [0m [0m [38;2;115;92;21m[48;2;173;138;30m▀[38;2;240;198;51m[48;2;134;111;35m▀[38;2;77;69;40m[48;2;25;36;59m▀[38;2;28;40;64m[48;2;29;61;87m▀[38;2;26;40;68m[48;2;96;232;244m▀[38;2;27;39;67m[48;2;101;168;183m▀[38;2;27;39;67m[48;2;22;35;63m▀[38;2;27;39;67m[48;2;22;35;63m▀[38;2;27;39;67m[48;2;49;139;159m▀[38;2;27;41;68m[48;2;141;238;247m▀[38;2;28;40;63m[48;2;26;48;75m▀[38;2;77;70;40m[48;2;26;37;59m▀[38;2;240;198;51m[48;2;143;118;35m▀[38;2;113;90;20m[48;2;169;137;30m▀[0m [0m [0m [0m [0m [0m [0m [0m [0m [38;2;255;195;0m██ ████ ████ ██████[0m
|
|
6
|
+
[0m [0m [0m[38;2;95;119;140m▄[0m[38;2;154;182;197m▄[38;2;42;56;72m[48;2;159;187;201m▀[0m[38;2;155;182;197m▄[0m[38;2;129;155;170m▄[38;2;71;67;58m[48;2;75;75;68m▀[38;2;116;106;76m[48;2;117;101;56m▀[38;2;98;79;30m[48;2;108;87;27m▀[38;2;21;33;58m[48;2;19;30;51m▀[38;2;34;85;108m[48;2;21;42;65m▀[38;2;76;242;255m[48;2;58;176;192m▀[38;2;74;194;209m[48;2;43;120;138m▀[38;2;20;32;58m[48;2;17;28;52m▀[38;2;20;32;58m[48;2;17;28;52m▀[38;2;62;190;206m[48;2;43;120;138m▀[38;2;87;242;255m[48;2;58;176;192m▀[38;2;34;85;108m[48;2;21;42;65m▀[38;2;21;33;57m[48;2;19;30;51m▀[38;2;97;79;30m[48;2;109;87;27m▀[38;2;116;107;77m[48;2;116;100;55m▀[38;2;71;67;58m[48;2;75;76;69m▀[0m[38;2;131;157;173m▄[0m[38;2;155;182;197m▄[38;2;41;55;71m[48;2;160;188;201m▀[0m[38;2;154;181;196m▄[0m[38;2;95;120;142m▄[0m [0m [0m [38;2;255;195;0m██████ ██ ██ ██ ██ ██ [0m
|
|
7
|
+
[0m[38;2;43;57;72m▄[38;2;137;163;179m[48;2;163;190;203m▀[38;2;198;227;235m[48;2;198;227;235m▀[38;2;198;227;235m[48;2;112;208;238m▀[38;2;198;227;235m[48;2;175;222;237m▀[38;2;198;227;235m[48;2;197;227;235m▀[38;2;198;227;235m[48;2;198;227;235m▀[38;2;149;165;158m[48;2;167;188;187m▀[38;2;179;136;18m[48;2;135;109;35m▀[38;2;171;131;22m[48;2;255;189;20m▀[38;2;22;28;39m[48;2;121;94;19m▀[38;2;15;25;47m[48;2;32;32;31m▀[38;2;15;25;47m[48;2;20;24;34m▀[38;2;30;76;95m[48;2;19;23;33m▀[38;2;40;112;130m[48;2;23;36;46m▀[38;2;39;111;131m[48;2;22;35;46m▀[38;2;29;74;94m[48;2;19;23;33m▀[38;2;15;25;47m[48;2;19;24;34m▀[38;2;15;25;47m[48;2;32;33;31m▀[38;2;23;28;40m[48;2;123;95;19m▀[38;2;173;131;22m[48;2;255;189;20m▀[38;2;171;134;25m[48;2;134;108;35m▀[38;2;150;166;161m[48;2;169;189;189m▀[38;2;198;227;235m[48;2;198;227;235m▀[38;2;198;227;235m[48;2;196;226;235m▀[38;2;198;227;235m[48;2;174;222;236m▀[38;2;198;227;235m[48;2;112;209;238m▀[38;2;198;227;235m[48;2;198;227;235m▀[38;2;136;161;177m[48;2;162;189;202m▀[0m[38;2;36;49;63m▄[0m [38;2;255;195;0m██ ██ ████████ ████████ ████ [0m
|
|
8
|
+
[0m [38;2;135;159;176m[48;2;61;81;102m▀[38;2;198;227;235m[48;2;195;223;232m▀[38;2;194;226;234m[48;2;198;227;235m▀[38;2;170;220;236m[48;2;198;227;235m▀[38;2;122;211;239m[48;2;154;217;237m▀[38;2;169;221;236m[48;2;159;218;235m▀[38;2;194;226;235m[48;2;157;218;237m▀[38;2;108;105;73m[48;2;159;216;233m▀[38;2;222;150;51m[48;2;172;118;107m▀[38;2;255;174;53m[48;2;218;140;84m▀[38;2;214;154;12m[48;2;216;153;5m▀[38;2;203;146;11m[48;2;230;163;6m▀[38;2;201;145;10m[48;2;230;163;6m▀[38;2;201;145;10m[48;2;230;163;6m▀[38;2;201;145;10m[48;2;230;163;6m▀[38;2;201;145;10m[48;2;230;163;6m▀[38;2;203;146;10m[48;2;230;163;6m▀[38;2;215;155;12m[48;2;215;152;5m▀[38;2;255;174;53m[48;2;217;140;84m▀[38;2;221;149;51m[48;2;173;119;108m▀[38;2;109;107;75m[48;2;160;217;233m▀[38;2;193;226;235m[48;2;157;217;236m▀[38;2;169;221;237m[48;2;159;218;236m▀[38;2;122;210;238m[48;2;156;217;237m▀[38;2;170;220;235m[48;2;198;227;235m▀[38;2;195;226;235m[48;2;198;227;235m▀[38;2;198;227;235m[48;2;193;222;231m▀[38;2;134;158;175m[48;2;56;74;96m▀[0m [0m [38;2;255;195;0m██ ██ ██ ██ ██[0m
|
|
9
|
+
[0m [0m [0m[38;2;72;93;114m▀[38;2;196;225;233m[48;2;60;80;101m▀[38;2;198;227;235m[48;2;157;185;200m▀[38;2;194;226;235m[48;2;198;227;235m▀[38;2;160;219;236m[48;2;198;227;235m▀[38;2;156;217;237m[48;2;187;224;234m▀[38;2;180;223;236m[48;2;137;213;237m▀[38;2;198;227;235m[48;2;157;217;236m▀[38;2;142;150;137m[48;2;198;227;235m▀[38;2;119;112;78m[48;2;198;227;235m▀[38;2;89;80;48m[48;2;108;120;119m▀[38;2;73;58;20m[48;2;83;80;67m▀[38;2;89;75;43m[48;2;121;124;128m▀[38;2;89;75;43m[48;2;121;124;128m▀[38;2;73;57;20m[48;2;84;79;67m▀[38;2;90;81;48m[48;2;110;122;120m▀[38;2;119;113;78m[48;2;198;227;235m▀[38;2;140;153;147m[48;2;198;227;235m▀[38;2;198;227;235m[48;2;155;217;236m▀[38;2;179;222;236m[48;2;138;213;237m▀[38;2;157;218;237m[48;2;188;225;235m▀[38;2;161;219;237m[48;2;198;227;235m▀[38;2;194;225;234m[48;2;181;204;207m▀[38;2;198;227;235m[48;2;130;147;149m▀[38;2;195;223;232m[48;2;60;80;101m▀[0m[38;2;72;93;115m▀[0m [0m [0m [38;2;255;195;0m██████ ██████ ██████ ██████ [0m
|
|
10
|
+
[0m [0m [0m [0m [0m [0m[38;2;77;98;117m▀[0m[38;2;126;151;169m▀[38;2;170;198;210m[48;2;42;57;73m▀[38;2;184;213;223m[48;2;54;73;94m▀[38;2;189;217;228m[48;2;67;78;83m▀[38;2;152;172;173m[48;2;113;95;29m▀[38;2;87;80;46m[48;2;247;221;112m▀[38;2;155;134;50m[48;2;255;235;152m▀[38;2;185;161;63m[48;2;255;232;136m▀[38;2;163;139;42m[48;2;255;218;66m▀[38;2;163;139;42m[48;2;255;218;66m▀[38;2;182;155;48m[48;2;255;218;66m▀[38;2;152;130;44m[48;2;255;218;66m▀[38;2;90;83;47m[48;2;245;209;63m▀[38;2;154;174;176m[48;2;113;95;29m▀[38;2;189;217;228m[48;2;67;78;84m▀[38;2;184;212;222m[48;2;54;74;95m▀[38;2;169;197;209m[48;2;42;56;73m▀[0m[38;2;116;136;149m▀[38;2;94;95;91m[48;2;94;90;81m▀[38;2;111;112;110m[48;2;102;100;96m▀[0m
|
|
11
|
+
[0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;64;50;8m▄[38;2;136;111;28m[48;2;195;160;38m▀[38;2;255;215;66m[48;2;203;166;40m▀[38;2;255;223;105m[48;2;203;166;40m▀[38;2;255;221;94m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;255;214;60m[48;2;203;166;40m▀[38;2;134;109;27m[48;2;195;158;38m▀[0m[38;2;65;50;8m▄[0m[38;2;55;53;46m▄[38;2;51;47;39m[48;2;113;114;116m▀[38;2;100;99;93m[48;2;42;33;13m▀[0m [0m [0m [0m [0m [0m [38;2;230;237;243mOne hive, every agent.[0m
|
|
12
|
+
[0m [0m [0m [0m [0m [0m [0m[38;2;23;16;1m▄[0m[38;2;70;63;45m▄[38;2;65;48;6m[48;2;110;85;14m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;96;71;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;70;50;0m[48;2;149;116;20m▀[38;2;70;50;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;96;71;0m[48;2;149;116;20m▀[38;2;43;29;0m[48;2;149;116;20m▀[38;2;67;51;9m[48;2;109;84;14m▀[38;2;90;86;76m[48;2;24;18;0m▀[0m[38;2;42;33;14m▀[0m
|
|
13
|
+
[0m [0m [0m [0m [0m [38;2;27;19;0m[48;2;88;83;72m▀[38;2;111;111;112m[48;2;67;63;54m▀[0m[38;2;72;66;53m▀[38;2;152;116;19m[48;2;85;63;7m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;255;198;35m[48;2;150;112;15m▀[38;2;151;115;18m[48;2;84;62;6m▀[0m [0m [0m [0m [0m [0m [0m [0m [0m [38;2;139;148;158mClaude Code · Copilot · Cursor · Codex[0m
|
|
14
|
+
[0m [0m [0m [0m [38;2;104;103;100m[48;2;90;87;82m▀[38;2;103;103;98m[48;2;90;88;82m▀[0m [0m [0m[38;2;57;42;3m▀[38;2;45;31;0m[48;2;90;66;4m▀[38;2;96;71;0m[48;2;202;147;12m▀[38;2;43;29;0m[48;2;202;147;12m▀[38;2;43;29;0m[48;2;202;147;12m▀[38;2;43;29;0m[48;2;202;147;12m▀[38;2;70;50;0m[48;2;202;147;12m▀[38;2;70;50;0m[48;2;202;147;12m▀[38;2;43;29;0m[48;2;202;147;12m▀[38;2;43;29;0m[48;2;202;147;12m▀[38;2;43;29;0m[48;2;202;147;12m▀[38;2;96;71;0m[48;2;202;147;12m▀[38;2;44;30;0m[48;2;89;64;5m▀[0m[38;2;57;41;3m▀[0m
|
|
15
|
+
[0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;81;58;3m▀[38;2;218;156;9m[48;2;53;37;1m▀[38;2;255;182;10m[48;2;106;74;2m▀[38;2;255;182;10m[48;2;170;118;4m▀[38;2;255;182;10m[48;2;185;129;3m▀[38;2;255;182;10m[48;2;185;129;3m▀[38;2;255;182;10m[48;2;169;119;3m▀[38;2;255;182;10m[48;2;106;74;2m▀[38;2;218;155;9m[48;2;54;37;1m▀[0m[38;2;81;57;3m▀[0m
|
|
16
|
+
[0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m [0m[38;2;24;17;0m▀[38;2;43;30;0m[48;2;32;22;0m▀[38;2;43;31;0m[48;2;33;23;0m▀[0m
|
|
17
|
+
[0m
|
package/bin/bees.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { main } from "../src/cli.js";
|
|
3
|
+
|
|
4
|
+
main().then(
|
|
5
|
+
(code) => {
|
|
6
|
+
process.exitCode = code;
|
|
7
|
+
},
|
|
8
|
+
(err) => {
|
|
9
|
+
console.error(process.env.BEES_DEBUG ? err : `✖ Unexpected error: ${err.message}\n Set BEES_DEBUG=1 for details, and please report it.`);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
},
|
|
12
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bees-agentic",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "One hive, every agent. Install a shared agentic dev environment (skills, agents, rules) into any project for Claude Code, Copilot, Cursor and Codex.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "nciross",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"bees": "bin/bees.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"bin/",
|
|
13
|
+
"src/",
|
|
14
|
+
"packs/",
|
|
15
|
+
"assets/cli-banner.ansi",
|
|
16
|
+
"assets/cli-banner-plain.txt"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node --test \"test/unit/*.test.js\" \"test/e2e/*.test.js\"",
|
|
23
|
+
"test:unit": "node --test \"test/unit/*.test.js\"",
|
|
24
|
+
"test:e2e": "node --test \"test/e2e/*.test.js\"",
|
|
25
|
+
"test:real": "node scripts/test-real-project.mjs",
|
|
26
|
+
"lint:md": "npx --yes markdownlint-cli2@0.24.2"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"yaml": "2.9.1"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/nciross/bees-agentic-template.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/nciross/bees-agentic-template#readme",
|
|
36
|
+
"bugs": "https://github.com/nciross/bees-agentic-template/issues",
|
|
37
|
+
"keywords": [
|
|
38
|
+
"agents",
|
|
39
|
+
"ai",
|
|
40
|
+
"claude-code",
|
|
41
|
+
"copilot",
|
|
42
|
+
"cursor",
|
|
43
|
+
"codex",
|
|
44
|
+
"agent-skills",
|
|
45
|
+
"agents-md",
|
|
46
|
+
"cli"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Explain this project to a new teammate - purpose, structure, how to run it and where to start.
|
|
3
|
+
argument-hint: "[area to focus on]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Give a new teammate a concise tour of this repository. Focus area (optional): $ARGUMENTS
|
|
7
|
+
|
|
8
|
+
Use the `project-context` skill, then answer:
|
|
9
|
+
|
|
10
|
+
1. **What it is**: the purpose of the project in two sentences.
|
|
11
|
+
2. **How to run it**: install, run, test and lint commands (from `AGENTS.md`), and any setup gotchas you find.
|
|
12
|
+
3. **Map**: the main folders and what lives in each.
|
|
13
|
+
4. **Key flows**: the two or three most important code paths, with file references.
|
|
14
|
+
5. **Where to start**: a good first file to read and a small, safe first task.
|
|
15
|
+
|
|
16
|
+
Keep it under one screen. Link files as `path:line` where it helps.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
name: core
|
|
2
|
+
version: 0.1.0
|
|
3
|
+
description: Shared AGENTS.md conventions, a project-context skill and safe defaults for every tool.
|
|
4
|
+
license: MIT
|
|
5
|
+
# Rendered into each tool's native permission settings where the tool has them.
|
|
6
|
+
permissions:
|
|
7
|
+
deny:
|
|
8
|
+
- Read(./.env)
|
|
9
|
+
- Read(./.env.*)
|
|
10
|
+
- Read(./secrets/**)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Working agreements
|
|
2
|
+
|
|
3
|
+
- **Understand before changing.** Read the code around a change and follow the patterns already in the repository, even when you would choose differently in a new project.
|
|
4
|
+
- **Small, focused changes.** Do what was asked. Note unrelated problems instead of fixing them in the same change.
|
|
5
|
+
- **Verify your work.** Run the test and lint commands listed above before calling a task done. Report failures honestly, with the output.
|
|
6
|
+
- **Tests come with code.** New behaviour gets a test; a bug fix gets a test that would have caught it.
|
|
7
|
+
- **Never commit secrets.** Do not read, print or commit `.env` files, keys or credentials. Use the project's existing configuration mechanism.
|
|
8
|
+
- **Ask when it matters.** If a requirement is ambiguous and a wrong guess would be costly, ask one clear question instead of guessing.
|
|
9
|
+
- **Humans approve outward actions.** Do not push, publish, deploy or post comments without explicit approval.
|
|
10
|
+
|
|
11
|
+
## Git
|
|
12
|
+
|
|
13
|
+
- Branch from the default branch; keep `main` releasable.
|
|
14
|
+
- Use [Conventional Commits](https://www.conventionalcommits.org/): `feat: …`, `fix: …`, `docs: …`, `chore: …`.
|
|
15
|
+
- One logical change per commit; explain *why* in the body when it is not obvious.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-context
|
|
3
|
+
description: Build an accurate picture of this repository before a non-trivial change - structure, conventions, commands and where similar code already lives. Use at the start of a feature, refactor or bug investigation in an unfamiliar area.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project context
|
|
7
|
+
|
|
8
|
+
Spend a few minutes learning the codebase before you change it. Keep notes short; you only need enough to make a change that fits.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Read the shared instructions.** `AGENTS.md` lists the stack and the commands to install, build, test and lint.
|
|
13
|
+
2. **Map the structure.** List the top-level folders and identify where source, tests, configuration and docs live.
|
|
14
|
+
3. **Find a precedent.** Search for code that already does something similar to your task (same layer, same kind of feature). Prefer extending that pattern over inventing a new one.
|
|
15
|
+
4. **Check the conventions.** Look at naming, error handling, logging, dependency injection and test style in the files you will touch.
|
|
16
|
+
5. **Check recent history.** `git log --oneline -15 -- <path>` shows how the area evolves and which commit style the team uses.
|
|
17
|
+
6. **Confirm the baseline.** Run the test command once before changing anything, so you know which failures already existed.
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
|
|
21
|
+
Summarise in at most five bullets: where the change goes, the pattern to follow, the tests to add or update, and any risk you noticed. Then start the task.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// AGENTS.md is the shared source every tool reads: Codex, Copilot and Cursor
|
|
2
|
+
// natively, Claude Code through an `@AGENTS.md` import in CLAUDE.md.
|
|
3
|
+
import { TOOL_LABELS } from "../config.js";
|
|
4
|
+
|
|
5
|
+
const COMMAND_LABELS = { install: "Install", dev: "Run locally", build: "Build", test: "Test", lint: "Lint" };
|
|
6
|
+
|
|
7
|
+
export function renderAgentsMd({ config, packs }) {
|
|
8
|
+
const { project, tools } = config;
|
|
9
|
+
const lines = [
|
|
10
|
+
"# Agent instructions",
|
|
11
|
+
"",
|
|
12
|
+
`Shared instructions for every AI coding agent working in this repository (${tools.map((t) => TOOL_LABELS[t]).join(", ")}).`,
|
|
13
|
+
"",
|
|
14
|
+
"## Project",
|
|
15
|
+
"",
|
|
16
|
+
`- **Name:** ${project.name ?? "(unnamed)"}`,
|
|
17
|
+
];
|
|
18
|
+
if (project.description) lines.push(`- **About:** ${project.description}`);
|
|
19
|
+
if (project.stack.length) lines.push(`- **Stack:** ${project.stack.join(", ")}`);
|
|
20
|
+
if (project.packageManager) lines.push(`- **Package manager:** ${project.packageManager}`);
|
|
21
|
+
|
|
22
|
+
const commands = Object.entries(COMMAND_LABELS).filter(([k]) => project.commands[k]);
|
|
23
|
+
if (commands.length) {
|
|
24
|
+
lines.push("", "### Commands", "", "| Task | Command |", "|---|---|");
|
|
25
|
+
for (const [k, label] of commands) lines.push(`| ${label} | \`${project.commands[k]}\` |`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (const pack of packs) for (const rule of pack.rules) lines.push("", rule.content);
|
|
29
|
+
|
|
30
|
+
const skills = packs.flatMap((p) => p.skills);
|
|
31
|
+
if (skills.length) {
|
|
32
|
+
lines.push("", "## Skills", "", "Load a skill only when the task needs it:", "");
|
|
33
|
+
for (const s of skills) lines.push(`- **${s.name}**: ${s.description}`);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Tools without native sub-agents still get the roles as plain guidance.
|
|
37
|
+
const agents = packs.flatMap((p) => p.agents);
|
|
38
|
+
if (agents.length && tools.some((t) => t === "cursor" || t === "codex")) {
|
|
39
|
+
lines.push("", "## Roles", "", "When asked to act as one of these roles, follow its description:", "");
|
|
40
|
+
for (const a of agents) lines.push(`- **${a.name}**: ${a.description}`);
|
|
41
|
+
}
|
|
42
|
+
return lines.join("\n");
|
|
43
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Claude Code: CLAUDE.md imports AGENTS.md; skills, commands and agents go under .claude/.
|
|
2
|
+
import { stringifyFrontmatter } from "../frontmatter.js";
|
|
3
|
+
import { skillFiles } from "./shared.js";
|
|
4
|
+
|
|
5
|
+
export function claude({ packs }) {
|
|
6
|
+
const out = [
|
|
7
|
+
{
|
|
8
|
+
path: "CLAUDE.md",
|
|
9
|
+
region: ["@AGENTS.md", "", "Claude Code-specific notes for this project can go below, outside the bees markers."].join("\n"),
|
|
10
|
+
},
|
|
11
|
+
...skillFiles(packs, ".claude/skills"),
|
|
12
|
+
];
|
|
13
|
+
for (const cmd of packs.flatMap((p) => p.commands)) {
|
|
14
|
+
out.push({
|
|
15
|
+
path: `.claude/commands/${cmd.name}.md`,
|
|
16
|
+
content: stringifyFrontmatter({ description: cmd.description, "argument-hint": cmd.data["argument-hint"] }, cmd.body),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
for (const agent of packs.flatMap((p) => p.agents)) {
|
|
20
|
+
out.push({
|
|
21
|
+
path: `.claude/agents/${agent.name}.md`,
|
|
22
|
+
content: stringifyFrontmatter(
|
|
23
|
+
{ name: agent.name, description: agent.description, tools: agent.data.tools, model: agent.data.model },
|
|
24
|
+
agent.body,
|
|
25
|
+
),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const deny = [...new Set(packs.flatMap((p) => p.permissions.deny))];
|
|
30
|
+
if (deny.length) {
|
|
31
|
+
out.push({
|
|
32
|
+
path: ".claude/settings.json",
|
|
33
|
+
json: (settings) => {
|
|
34
|
+
const permissions = settings.permissions ?? {};
|
|
35
|
+
const current = Array.isArray(permissions.deny) ? permissions.deny : [];
|
|
36
|
+
return { ...settings, permissions: { ...permissions, deny: [...current, ...deny.filter((d) => !current.includes(d))] } };
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return out;
|
|
41
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Codex: reads AGENTS.md natively and discovers repository skills in .agents/skills/.
|
|
2
|
+
// Custom prompts are user-scope only in Codex, so project commands are not rendered.
|
|
3
|
+
import { skillFiles } from "./shared.js";
|
|
4
|
+
|
|
5
|
+
export function codex({ packs }) {
|
|
6
|
+
return skillFiles(packs, ".agents/skills");
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// GitHub Copilot: repository instructions, prompt files, custom agents and skills under .github/.
|
|
2
|
+
import { stringifyFrontmatter } from "../frontmatter.js";
|
|
3
|
+
import { skillFiles } from "./shared.js";
|
|
4
|
+
|
|
5
|
+
export function copilot({ packs }) {
|
|
6
|
+
const out = [
|
|
7
|
+
{
|
|
8
|
+
path: ".github/copilot-instructions.md",
|
|
9
|
+
region: "Follow the shared agent instructions in [AGENTS.md](../AGENTS.md): project facts, commands and team conventions live there.",
|
|
10
|
+
},
|
|
11
|
+
...skillFiles(packs, ".github/skills"),
|
|
12
|
+
];
|
|
13
|
+
for (const cmd of packs.flatMap((p) => p.commands)) {
|
|
14
|
+
out.push({
|
|
15
|
+
path: `.github/prompts/${cmd.name}.prompt.md`,
|
|
16
|
+
content: stringifyFrontmatter({ description: cmd.description, agent: "agent" }, cmd.body.replace(/\$ARGUMENTS/g, "${input:arguments}")),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
for (const agent of packs.flatMap((p) => p.agents)) {
|
|
20
|
+
out.push({
|
|
21
|
+
path: `.github/agents/${agent.name}.agent.md`,
|
|
22
|
+
content: stringifyFrontmatter({ name: agent.name, description: agent.description }, agent.body),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Cursor: reads AGENTS.md natively. Skills are exposed as agent-requested rules
|
|
2
|
+
// that point at the skill folder; commands go to .cursor/commands/.
|
|
3
|
+
import { stringifyFrontmatter } from "../frontmatter.js";
|
|
4
|
+
import { skillFiles } from "./shared.js";
|
|
5
|
+
|
|
6
|
+
export function cursor({ packs }) {
|
|
7
|
+
const out = [...skillFiles(packs, ".cursor/skills")];
|
|
8
|
+
for (const skill of packs.flatMap((p) => p.skills)) {
|
|
9
|
+
out.push({
|
|
10
|
+
path: `.cursor/rules/bees-${skill.name}.mdc`,
|
|
11
|
+
content: stringifyFrontmatter(
|
|
12
|
+
{ description: skill.description, alwaysApply: false },
|
|
13
|
+
`When this applies, read and follow \`.cursor/skills/${skill.name}/SKILL.md\`.`,
|
|
14
|
+
),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
for (const cmd of packs.flatMap((p) => p.commands)) {
|
|
18
|
+
out.push({ path: `.cursor/commands/${cmd.name}.md`, content: cmd.body.trim() + "\n" });
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Adapters are pure: (config, packs) → list of outputs.
|
|
2
|
+
// { path, content } file fully owned by bees (tracked in bees.lock)
|
|
3
|
+
// { path, region } managed region inside a file the team also edits
|
|
4
|
+
// { path, json: (obj) => obj } JSON file bees merges into, keeping other keys
|
|
5
|
+
import { renderAgentsMd } from "./agents-md.js";
|
|
6
|
+
import { claude } from "./claude.js";
|
|
7
|
+
import { codex } from "./codex.js";
|
|
8
|
+
import { copilot } from "./copilot.js";
|
|
9
|
+
import { cursor } from "./cursor.js";
|
|
10
|
+
import { BeesError } from "../util.js";
|
|
11
|
+
|
|
12
|
+
export const ADAPTERS = { claude, copilot, cursor, codex };
|
|
13
|
+
|
|
14
|
+
export function renderAll(ctx) {
|
|
15
|
+
const outputs = [{ path: "AGENTS.md", region: renderAgentsMd(ctx) }];
|
|
16
|
+
for (const tool of ctx.config.tools) outputs.push(...ADAPTERS[tool](ctx));
|
|
17
|
+
|
|
18
|
+
const seen = new Map();
|
|
19
|
+
const merged = [];
|
|
20
|
+
for (const out of outputs) {
|
|
21
|
+
const prev = seen.get(out.path);
|
|
22
|
+
if (!prev) {
|
|
23
|
+
seen.set(out.path, out);
|
|
24
|
+
merged.push(out);
|
|
25
|
+
} else if (prev.content === undefined || prev.content !== out.content) {
|
|
26
|
+
throw new BeesError(`Two outputs want to write ${out.path}. Check for duplicate skill or command names across packs.`);
|
|
27
|
+
}
|
|
28
|
+
// identical owned files from two adapters (shared folders) are fine
|
|
29
|
+
}
|
|
30
|
+
return merged.sort((a, b) => a.path.localeCompare(b.path));
|
|
31
|
+
}
|