Skip to content

Commit b78e00a

Browse files
jugolclaude
andcommitted
Initial public release
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 parents  commit b78e00a

2,620 files changed

Lines changed: 1477974 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
---
2+
name: company-creator
3+
description: >
4+
Create agent company packages conforming to the Agent Companies specification
5+
(agentcompanies/v1). Use when a user wants to create a new agent company from
6+
scratch, build a company around an existing git repo or skills collection, or
7+
scaffold a team/department of agents. Triggers on: "create a company", "make me
8+
a company", "build a company from this repo", "set up an agent company",
9+
"create a team of agents", "hire some agents", or when given a repo URL and
10+
asked to turn it into a company. Do NOT use for importing an existing company
11+
package (use the CLI import command instead) or for modifying a company that
12+
is already running in Workcell.
13+
---
14+
15+
# Company Creator
16+
17+
Create agent company packages that conform to the Agent Companies specification.
18+
19+
Spec references:
20+
21+
- Normative spec: `docs/companies/companies-spec.md` (read this before generating files)
22+
- Web spec: https://agentcompanies.io/specification
23+
- Protocol site: https://agentcompanies.io/
24+
25+
## Two Modes
26+
27+
### Mode 1: Company From Scratch
28+
29+
The user describes what they want. Interview them to flesh out the vision, then generate the package.
30+
31+
### Mode 2: Company From a Repo
32+
33+
The user provides a git repo URL, local path, or tweet. Analyze the repo, then create a company that wraps it.
34+
35+
See [references/from-repo-guide.md](references/from-repo-guide.md) for detailed repo analysis steps.
36+
37+
## Process
38+
39+
### Step 1: Gather Context
40+
41+
Determine which mode applies:
42+
43+
- **From scratch**: What kind of company or team? What domain? What should the agents do?
44+
- **From repo**: Clone/read the repo. Scan for existing skills, agent configs, README, source structure.
45+
46+
### Step 2: Interview (Use AskUserQuestion)
47+
48+
Do not skip this step. Use AskUserQuestion to align with the user before writing any files.
49+
50+
**For from-scratch companies**, ask about:
51+
52+
- Company purpose and domain (1-2 sentences is fine)
53+
- What agents they need - propose a hiring plan based on what they described
54+
- Whether this is a full company (needs a CEO) or a team/department (no CEO required)
55+
- Any specific skills the agents should have
56+
- How work flows through the organization (see "Workflow" below)
57+
- Whether they want projects and starter tasks
58+
59+
**For from-repo companies**, present your analysis and ask:
60+
61+
- Confirm the agents you plan to create and their roles
62+
- Whether to reference or vendor any discovered skills (default: reference)
63+
- Any additional agents or skills beyond what the repo provides
64+
- Company name and any customization
65+
- Confirm the workflow you inferred from the repo (see "Workflow" below)
66+
67+
**Workflow — how does work move through this company?**
68+
69+
A company is not just a list of agents with skills. It's an organization that takes ideas and turns them into work products. You need to understand the workflow so each agent knows:
70+
71+
- Who gives them work and in what form (a task, a branch, a question, a review request)
72+
- What they do with it
73+
- Who they hand off to when they're done, and what that handoff looks like
74+
- What "done" means for their role
75+
76+
**Not every company is a pipeline.** Infer the right workflow pattern from context:
77+
78+
- **Pipeline** — sequential stages, each agent hands off to the next. Use when the repo/domain has a clear linear process (e.g. plan → build → review → ship → QA, or content ideation → draft → edit → publish).
79+
- **Hub-and-spoke** — a manager delegates to specialists who report back independently. Use when agents do different kinds of work that don't feed into each other (e.g. a CEO who dispatches to a researcher, a marketer, and an analyst).
80+
- **Collaborative** — agents work together on the same things as peers. Use for small teams where everyone contributes to the same output (e.g. a design studio, a brainstorming team).
81+
- **On-demand** — agents are summoned as needed with no fixed flow. Use when agents are more like a toolbox of specialists the user calls directly.
82+
83+
For from-scratch companies, propose a workflow pattern based on what they described and ask if it fits.
84+
85+
For from-repo companies, infer the pattern from the repo's structure. If skills have a clear sequential dependency (like `plan-ceo-review → plan-eng-review → review → ship → qa`), that's a pipeline. If skills are independent capabilities, it's more likely hub-and-spoke or on-demand. State your inference in the interview so the user can confirm or adjust.
86+
87+
**Key interviewing principles:**
88+
89+
- Propose a concrete hiring plan. Don't ask open-ended "what agents do you want?" - suggest specific agents based on context and let the user adjust.
90+
- Keep it lean. Most users are new to agent companies. A few agents (3-5) is typical for a startup. Don't suggest 10+ agents unless the scope demands it.
91+
- From-scratch companies should start with a CEO who manages everyone. Teams/departments don't need one.
92+
- Ask 2-3 focused questions per round, not 10.
93+
94+
### Step 3: Read the Spec
95+
96+
Before generating any files, read the normative spec:
97+
98+
```
99+
docs/companies/companies-spec.md
100+
```
101+
102+
Also read the quick reference: [references/companies-spec.md](references/companies-spec.md)
103+
104+
And the example: [references/example-company.md](references/example-company.md)
105+
106+
### Step 4: Generate the Package
107+
108+
Create the directory structure and all files. Follow the spec's conventions exactly.
109+
110+
**Directory structure:**
111+
112+
```
113+
<company-slug>/
114+
├── COMPANY.md
115+
├── agents/
116+
│ └── <slug>/AGENTS.md
117+
├── teams/
118+
│ └── <slug>/TEAM.md (if teams are needed)
119+
├── projects/
120+
│ └── <slug>/PROJECT.md (if projects are needed)
121+
├── tasks/
122+
│ └── <slug>/TASK.md (if tasks are needed)
123+
├── skills/
124+
│ └── <slug>/SKILL.md (if custom skills are needed)
125+
└── .workcell.yaml (Workcell vendor extension)
126+
```
127+
128+
**Rules:**
129+
130+
- Slugs must be URL-safe, lowercase, hyphenated
131+
- COMPANY.md gets `schema: agentcompanies/v1` - other files inherit it
132+
- Agent instructions go in the AGENTS.md body, not in .workcell.yaml
133+
- Skills referenced by shortname in AGENTS.md resolve to `skills/<shortname>/SKILL.md`
134+
- For external skills, use `sources` with `usage: referenced` (see spec section 12)
135+
- Do not export secrets, machine-local paths, or database IDs
136+
- Omit empty/default fields
137+
- For companies generated from a repo, add a references footer at the bottom of COMPANY.md body:
138+
`Generated from [repo-name](repo-url) with the company-creator skill from [Workcell](https://github.com/jugol/workcell)`
139+
140+
**Reporting structure:**
141+
142+
- Every agent except the CEO should have `reportsTo` set to their manager's slug
143+
- The CEO has `reportsTo: null`
144+
- For teams without a CEO, the top-level agent has `reportsTo: null`
145+
146+
**Writing workflow-aware agent instructions:**
147+
148+
Each AGENTS.md body should include not just what the agent does, but how they fit into the organization's workflow. Include:
149+
150+
1. **Where work comes from** — "You receive feature ideas from the user" or "You pick up tasks assigned to you by the CTO"
151+
2. **What you produce** — "You produce a technical plan with architecture diagrams" or "You produce a reviewed, approved branch ready for shipping"
152+
3. **Who you hand off to** — "When your plan is locked, hand off to the Staff Engineer for implementation" or "When review passes, hand off to the Release Engineer to ship"
153+
4. **What triggers you** — "You are activated when a new feature idea needs product-level thinking" or "You are activated when a branch is ready for pre-landing review"
154+
155+
This turns a collection of agents into an organization that actually works together. Without workflow context, agents operate in isolation — they do their job but don't know what happens before or after them.
156+
157+
Add a concise execution contract to every generated working agent:
158+
159+
- Start actionable work in the same heartbeat and do not stop at a plan unless planning was requested.
160+
- Leave durable progress in comments, documents, or work products with the next action.
161+
- Use child issues for long or parallel delegated work instead of polling agents, sessions, or processes.
162+
- Mark blocked work with the unblock owner and action.
163+
- Respect budget, pause/cancel, approval gates, and company boundaries.
164+
165+
### Step 5: Confirm Output Location
166+
167+
Ask the user where to write the package. Common options:
168+
169+
- A subdirectory in the current repo
170+
- A new directory the user specifies
171+
- The current directory (if it's empty or they confirm)
172+
173+
### Step 6: Write README.md and LICENSE
174+
175+
**README.md** — every company package gets a README. It should be a nice, readable introduction that someone browsing GitHub would appreciate. Include:
176+
177+
- Company name and what it does
178+
- The workflow / how the company operates
179+
- Org chart as a markdown list or table showing agents, titles, reporting structure, and skills
180+
- Brief description of each agent's role
181+
- Citations and references: link to the source repo (if from-repo), link to the Agent Companies spec (https://agentcompanies.io/specification), and link to Workcell (https://github.com/jugol/workcell)
182+
- A "Getting Started" section explaining how to import: `workcell company import --from <path>`
183+
184+
**LICENSE** — include a LICENSE file. The copyright holder is the user creating the company, not the upstream repo author (they made the skills, the user is making the company). Use the same license type as the source repo (if from-repo) or ask the user (if from-scratch). Default to MIT if unclear.
185+
186+
### Step 7: Write Files and Summarize
187+
188+
Write all files, then give a brief summary:
189+
190+
- Company name and what it does
191+
- Agent roster with roles and reporting structure
192+
- Skills (custom + referenced)
193+
- Projects and tasks if any
194+
- The output path
195+
196+
## .workcell.yaml Guidelines
197+
198+
The `.workcell.yaml` file is the Workcell vendor extension. It configures adapters and env inputs per agent.
199+
200+
### Adapter Rules
201+
202+
**Do not specify an adapter unless the repo or user context warrants it.** If you don't know what adapter the user wants, omit the adapter block entirely — Workcell will use its default. Specifying an unknown adapter type causes an import error.
203+
204+
Workcell's supported adapter types (these are the ONLY valid values):
205+
- `claude_local` — Claude Code CLI
206+
- `codex_local` — Codex CLI
207+
- `opencode_local` — OpenCode CLI
208+
- `pi_local` — Pi CLI
209+
- `cursor` — Cursor
210+
- `gemini_local` — Gemini CLI
211+
- `openclaw_gateway` — OpenClaw gateway
212+
213+
Only set an adapter when:
214+
- The repo or its skills clearly target a specific runtime (e.g. gstack is built for Claude Code, so `claude_local` is appropriate)
215+
- The user explicitly requests a specific adapter
216+
- The agent's role requires a specific runtime capability
217+
218+
### Env Inputs Rules
219+
220+
**Do not add boilerplate env variables.** Only add env inputs that the agent actually needs based on its skills or role:
221+
- `GH_TOKEN` for agents that push code, create PRs, or interact with GitHub
222+
- API keys only when a skill explicitly requires them
223+
- Never set `ANTHROPIC_API_KEY` as a default empty env variable — the runtime handles this
224+
225+
Example with adapter (only when warranted):
226+
```yaml
227+
schema: workcell/v1
228+
agents:
229+
release-engineer:
230+
adapter:
231+
type: claude_local
232+
config:
233+
model: claude-sonnet-4-6
234+
inputs:
235+
env:
236+
GH_TOKEN:
237+
kind: secret
238+
requirement: optional
239+
```
240+
241+
Example — only agents with actual overrides appear:
242+
```yaml
243+
schema: workcell/v1
244+
agents:
245+
release-engineer:
246+
inputs:
247+
env:
248+
GH_TOKEN:
249+
kind: secret
250+
requirement: optional
251+
```
252+
253+
In this example, only `release-engineer` appears because it needs `GH_TOKEN`. The other agents (ceo, cto, etc.) have no overrides, so they are omitted entirely from `.workcell.yaml`.
254+
255+
## External Skill References
256+
257+
When referencing skills from a GitHub repo, always use the references pattern:
258+
259+
```yaml
260+
metadata:
261+
sources:
262+
- kind: github-file
263+
repo: owner/repo
264+
path: path/to/SKILL.md
265+
commit: <full SHA from git ls-remote or the repo>
266+
attribution: Owner or Org Name
267+
license: <from the repo's LICENSE>
268+
usage: referenced
269+
```
270+
271+
Get the commit SHA with:
272+
273+
```bash
274+
git ls-remote https://github.com/owner/repo HEAD
275+
```
276+
277+
Do NOT copy external skill content into the package unless the user explicitly asks.

0 commit comments

Comments
 (0)