@firatcand/roster 0.4.0 → 1.0.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.
- package/README.md +79 -219
- package/agents/lesson-drafter.md +3 -8
- package/agents/pattern-detector.md +0 -1
- package/bin/roster.js +1407 -217
- package/package.json +2 -3
- package/skills/chief-of-staff/SKILL.md +62 -78
- package/skills/dreamer/SKILL.md +8 -7
- package/skills/roster-orchestrator/SKILL.md +53 -25
- package/templates/CLAUDE.project.template.md +1 -1
- package/templates/CONTEXT.template.md +2 -2
- package/templates/gitignore-defaults.txt +2 -0
- package/templates/scaffold/chief-of-staff/README.md +16 -24
- package/templates/scaffold/chief-of-staff/agent.md +22 -32
- package/templates/scaffold/chief-of-staff/plans/audit-agent.yaml +4 -4
- package/templates/scaffold/chief-of-staff/plans/audit-repo.yaml +5 -4
- package/templates/scaffold/chief-of-staff/plans/create-agent.yaml +5 -34
- package/templates/scaffold/config/project.yaml.template +10 -0
- package/templates/scaffold/conventions.md +159 -171
- package/templates/scaffold/dreamer/README.md +2 -2
- package/templates/scaffold/dreamer/agent.md +0 -1
- package/templates/scaffold/dreamer/plans/nightly-reflection.yaml +23 -37
- package/templates/scaffold/dreamer/subagents/lesson-drafter.md +2 -7
- package/templates/scaffold/{projects/_demo/guidelines → guidelines}/asset-links.md +4 -0
- package/templates/scaffold/{projects/_demo/guidelines → guidelines}/brand-book.md +4 -0
- package/templates/scaffold/{projects/_demo/guidelines → guidelines}/messaging.md +4 -0
- package/templates/scaffold/{projects/_demo/guidelines → guidelines}/voice.md +4 -0
- package/templates/scaffold/scripts/audit-agent.sh +74 -47
- package/templates/scaffold/scripts/audit-repo.sh +27 -49
- package/templates/scaffold/scripts/create-function.sh +1 -1
- package/templates/scaffold/scripts/lib/README.md +1 -1
- package/templates/scaffold/scripts/lib/bindings-prompt.sh +43 -124
- package/templates/scaffold/scripts/new-agent.sh +99 -91
- package/templates/scaffold/scripts/rename-agent.sh +91 -0
- package/templates/scaffold/scripts/save-state.sh +32 -0
- package/agents/critic.md +0 -74
- package/agents/enricher.md +0 -56
- package/agents/promotion-arbiter.md +0 -71
- package/agents/prospector.md +0 -51
- package/agents/writer.md +0 -58
- package/skills/sdr/SKILL.md +0 -147
- package/templates/scaffold/chief-of-staff/plans/add-agent-to-project.yaml +0 -45
- package/templates/scaffold/chief-of-staff/plans/archive-project.yaml +0 -51
- package/templates/scaffold/chief-of-staff/plans/audit-project.yaml +0 -34
- package/templates/scaffold/chief-of-staff/plans/create-project.yaml +0 -65
- package/templates/scaffold/chief-of-staff/plans/remove-agent-from-project.yaml +0 -50
- package/templates/scaffold/chief-of-staff/plans/rename-project.yaml +0 -62
- package/templates/scaffold/chief-of-staff/plans/unarchive-project.yaml +0 -41
- package/templates/scaffold/dreamer/subagents/promotion-arbiter.md +0 -64
- package/templates/scaffold/gtm/sdr/.claude/settings.json +0 -3
- package/templates/scaffold/gtm/sdr/.mcp.json +0 -21
- package/templates/scaffold/gtm/sdr/README.md +0 -41
- package/templates/scaffold/gtm/sdr/agent.md +0 -136
- package/templates/scaffold/gtm/sdr/plans/cold-outreach.yaml +0 -92
- package/templates/scaffold/gtm/sdr/projects/_demo/asset-references.md +0 -7
- package/templates/scaffold/gtm/sdr/projects/_demo/config/default.yaml +0 -69
- package/templates/scaffold/gtm/sdr/projects/_demo/log/feedback/.gitkeep +0 -0
- package/templates/scaffold/gtm/sdr/projects/_demo/log/runs/.gitkeep +0 -0
- package/templates/scaffold/gtm/sdr/projects/_demo/playbook/.gitkeep +0 -0
- package/templates/scaffold/gtm/sdr/subagents/critic.md +0 -67
- package/templates/scaffold/gtm/sdr/subagents/enricher.md +0 -49
- package/templates/scaffold/gtm/sdr/subagents/prospector.md +0 -44
- package/templates/scaffold/gtm/sdr/subagents/writer.md +0 -51
- package/templates/scaffold/projects/_demo/CLAUDE.md +0 -35
- package/templates/scaffold/projects/_demo/README.md +0 -16
- package/templates/scaffold/projects/_demo/assets/.gitkeep +0 -0
- package/templates/scaffold/projects/_demo/config/default.yaml +0 -28
- package/templates/scaffold/projects/_demo/state.md +0 -11
- package/templates/scaffold/scripts/archive-project.sh +0 -98
- package/templates/scaffold/scripts/audit-project.sh +0 -361
- package/templates/scaffold/scripts/new-agent-instance.sh +0 -114
- package/templates/scaffold/scripts/new-project.sh +0 -125
- package/templates/scaffold/scripts/remove-agent-from-project.sh +0 -67
- package/templates/scaffold/scripts/rename-project.sh +0 -118
- package/templates/scaffold/scripts/unarchive-project.sh +0 -115
- /package/templates/scaffold/gtm/{sdr/playbook/.gitkeep → .gitkeep} +0 -0
- /package/templates/scaffold/{projects/_demo/guidelines → guidelines}/icps/_persona-template.md +0 -0
|
@@ -4,70 +4,74 @@ Full reference. CLAUDE.md is the short behavioral guide loaded at session start;
|
|
|
4
4
|
|
|
5
5
|
## Repo philosophy
|
|
6
6
|
|
|
7
|
-
1. **
|
|
8
|
-
2. **
|
|
9
|
-
3.
|
|
10
|
-
4.
|
|
11
|
-
5. **
|
|
12
|
-
6. **
|
|
13
|
-
7. **The dreamer learns; agents act.** Reinforcement is a separate, deliberate process. Live agents don't update playbooks.
|
|
7
|
+
1. **Workspace = project.** One install, one product. Identity lives in `config/project.yaml`; voice, ICPs, messaging, and design substrate live in `guidelines/`. There is no `projects/<name>/` dimension.
|
|
8
|
+
2. **Agents are the unit of reuse.** An agent's logic, plans, subagents, and tools live once at `<function>/<agent>/`. Reuse comes from copying agents across workspaces, not from a project axis within a workspace.
|
|
9
|
+
3. **`guidelines/` is cross-agent substrate.** Voice, ICPs, design, brand-book, messaging, do-and-don't, compliance, competitors, asset-links live at workspace root. Every agent reads them via workspace-root-relative refs.
|
|
10
|
+
4. **`<agent>/.env` inherits from `/.env`.** Each agent may have its own `.env`. Keys defined there override the workspace `/.env`; keys absent inherit. Empty string is an explicit unset.
|
|
11
|
+
5. **Tooling scoped where it belongs.** Universal MCPs/skills/plugins live at root (`.claude/`, `.mcp.json`). Agent-scoped MCPs live at `<agent>/.mcp.json`. No per-workspace tool duplication.
|
|
12
|
+
6. **Files are the memory layer for agent operations.** Run logs, playbook lessons, configs, and guidelines are Markdown/YAML in Git — no vector DB, no embedding store. Output artifacts (enriched data, drafts, structured results) are not memory; use whatever storage fits — a DB is fine.
|
|
13
|
+
7. **The dreamer learns; agents act.** Reinforcement is a separate, deliberate process. Live agents don't update playbooks. Dreamer-drafted lessons go through HITL approval before they land in `<agent>/playbook/`.
|
|
14
|
+
8. **Schedules are stateless and subscription-billed.** A native local scheduler (Claude Desktop Scheduled Tasks, Codex app Automations, or a Codex cron entry installed via `roster schedule install --via cron`) fires a fresh CLI session that loads `CONTEXT.md` (via `CLAUDE.md`/`AGENTS.md`) and invokes the `roster-orchestrator` skill. No Agent SDK, no `claude -p`. See ADR-0001.
|
|
14
15
|
|
|
15
16
|
## Directory map
|
|
16
17
|
|
|
17
18
|
```
|
|
18
|
-
agent-team/
|
|
19
|
-
├── .
|
|
20
|
-
├── .
|
|
19
|
+
agent-team/ # = your project workspace
|
|
20
|
+
├── CLAUDE.md # behavioral rules + identity at a glance
|
|
21
|
+
├── conventions.md # this file
|
|
22
|
+
├── state.md # last task / next session (written by /save-state)
|
|
23
|
+
├── .env # workspace-wide secrets (gitignored, 0600)
|
|
24
|
+
├── .claude/ # universal Claude Code config
|
|
25
|
+
├── .mcp.json # universal MCPs
|
|
21
26
|
│
|
|
22
|
-
├──
|
|
23
|
-
│
|
|
24
|
-
│
|
|
25
|
-
|
|
27
|
+
├── config/
|
|
28
|
+
│ └── project.yaml # machine-readable identity (name, stage, motion, audience)
|
|
29
|
+
│
|
|
30
|
+
├── guidelines/ # cross-agent substrate (read by every agent)
|
|
31
|
+
│ ├── voice.md
|
|
32
|
+
│ ├── messaging.md
|
|
33
|
+
│ ├── brand-book.md
|
|
34
|
+
│ ├── asset-links.md # local paths + URLs to brand assets
|
|
35
|
+
│ ├── icps/<persona-slug>.md # one file per persona
|
|
36
|
+
│ ├── design.md # optional
|
|
37
|
+
│ ├── design-tokens.md # optional
|
|
38
|
+
│ ├── do-and-dont.md # optional
|
|
39
|
+
│ ├── compliance.md # optional
|
|
40
|
+
│ └── competitors.md # optional
|
|
41
|
+
│
|
|
42
|
+
├── <function>/ # gtm | product | design | ops | (see .config/functions.yaml)
|
|
43
|
+
│ ├── EXPERT.md # function-level expert prompt (optional, see has_expert)
|
|
44
|
+
│ └── <agent>/ # flat — no projects/ subdir
|
|
45
|
+
│ ├── agent.md # behavioral prompt + tool bindings schema
|
|
26
46
|
│ ├── README.md
|
|
27
|
-
│ ├──
|
|
28
|
-
│ ├──
|
|
29
|
-
│ ├──
|
|
30
|
-
│ ├──
|
|
31
|
-
│ ├──
|
|
32
|
-
│
|
|
33
|
-
│
|
|
34
|
-
│
|
|
35
|
-
│
|
|
36
|
-
│
|
|
37
|
-
│
|
|
38
|
-
│ ├── log/feedback/<YYYY-MM>/
|
|
39
|
-
│ └── asset-references.md # which project assets this agent uses
|
|
47
|
+
│ ├── config.yaml # guideline refs + tool bindings (workspace-root paths)
|
|
48
|
+
│ ├── .env # agent-scoped overrides (gitignored, 0600, optional)
|
|
49
|
+
│ ├── plans/<plan>.yaml # named workflows the agent runs
|
|
50
|
+
│ ├── playbook/<lesson>.md # validated lessons (no scope field — single playbook)
|
|
51
|
+
│ ├── pending/<item>.md # HITL items awaiting approval (dreamer drafts land here)
|
|
52
|
+
│ ├── logs/runs/<YYYY-MM>/ # one run file per invocation
|
|
53
|
+
│ ├── logs/feedback/<YYYY-MM>/ # mirror filenames for run feedback
|
|
54
|
+
│ ├── subagents/<subagent>.md
|
|
55
|
+
│ ├── asset-references.md # which workspace assets this agent uses (thin pointer)
|
|
56
|
+
│ ├── .claude/ # agent-scoped Claude Code config
|
|
57
|
+
│ └── .mcp.json # agent-scoped MCPs
|
|
40
58
|
│
|
|
41
59
|
├── dreamer/ # cross-cutting reinforcement agent
|
|
42
|
-
│ └── <same shape>
|
|
60
|
+
│ └── <same flat shape>
|
|
43
61
|
│
|
|
44
|
-
├── chief-of-staff/
|
|
62
|
+
├── chief-of-staff/ # cross-cutting maintenance agent (operates on this workspace)
|
|
45
63
|
│ ├── agent.md
|
|
46
|
-
│ ├──
|
|
64
|
+
│ ├── plans/{create-agent,create-function,audit-agent,audit-repo}.yaml
|
|
47
65
|
│ ├── playbook/
|
|
48
|
-
│ └── logs/
|
|
66
|
+
│ └── logs/ # operation logs + audit reports
|
|
49
67
|
│
|
|
50
|
-
├──
|
|
51
|
-
│ ├──
|
|
52
|
-
│
|
|
53
|
-
│
|
|
54
|
-
│ ├── GUIDANCE.md
|
|
55
|
-
│ ├── state.md
|
|
56
|
-
│ ├── guidelines/
|
|
57
|
-
│ │ ├── voice.md
|
|
58
|
-
│ │ ├── icps/<persona-slug>.md # multiple personas, one file each
|
|
59
|
-
│ │ ├── design.md
|
|
60
|
-
│ │ ├── design-tokens.md
|
|
61
|
-
│ │ ├── brand-book.md
|
|
62
|
-
│ │ ├── messaging.md
|
|
63
|
-
│ │ ├── do-and-dont.md # may be empty stub
|
|
64
|
-
│ │ ├── compliance.md # may be empty stub
|
|
65
|
-
│ │ ├── competitors.md # may be empty stub
|
|
66
|
-
│ │ └── asset-links.md # local paths + URLs to external assets
|
|
67
|
-
│ └── assets/ # local files (gitignored if large)
|
|
68
|
+
├── roster/<function>/ # scheduler runtime tree
|
|
69
|
+
│ ├── schedules.yaml # entries: name, agent, plan, cron, tool, install_mode
|
|
70
|
+
│ ├── state.md # one line per fire (agent-level signal)
|
|
71
|
+
│ └── pending/ # HITL items surfaced on session start
|
|
68
72
|
│
|
|
69
|
-
├── scripts/
|
|
70
|
-
└── logs/cron/
|
|
73
|
+
├── scripts/ # scaffolding helpers (new-agent, audit-agent, audit-repo, save-state, create-function, rename-agent)
|
|
74
|
+
└── logs/cron/ # cron stdout/stderr/.exit/.events.jsonl
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
## Function categories
|
|
@@ -80,51 +84,49 @@ Add a new function only when at least 2-3 agents will live there within ~90 days
|
|
|
80
84
|
|
|
81
85
|
## Tool bindings
|
|
82
86
|
|
|
83
|
-
Each agent that uses external tools declares a `## Tools and bindings` section in its `agent.md`. This is a YAML code block that names tools,
|
|
87
|
+
Each agent that uses external tools declares a `## Tools and bindings` section in its `agent.md`. This is a YAML code block that names tools, the env vars they require, a `required` flag, and a description.
|
|
84
88
|
|
|
85
89
|
```yaml
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
apollo:
|
|
91
|
+
env_var: APOLLO_API_KEY
|
|
92
|
+
required: true
|
|
93
|
+
description: "B2B contact data API"
|
|
94
|
+
slack:
|
|
95
|
+
env_var: SLACK_BOT_TOKEN
|
|
96
|
+
required: false
|
|
97
|
+
description: "Used only when approval_channel = slack"
|
|
93
98
|
```
|
|
94
99
|
|
|
95
|
-
When chief-of-staff scaffolds a new agent
|
|
100
|
+
When chief-of-staff scaffolds a new agent via `create-agent`, it parses this block and writes the bindings into the agent's `config.yaml` under `tools:`. The env vars themselves are filled in the workspace `/.env` (or overridden in `<agent>/.env`).
|
|
96
101
|
|
|
97
102
|
### Runtime read order
|
|
98
103
|
|
|
99
|
-
When invoked, an agent reads:
|
|
104
|
+
When invoked, an agent's slash-command router reads:
|
|
100
105
|
|
|
101
106
|
1. Its `agent.md` (logic + bindings schema)
|
|
102
|
-
2.
|
|
103
|
-
3.
|
|
107
|
+
2. Its `config.yaml` (`guideline_refs:` + `tools:`)
|
|
108
|
+
3. Resolves env via `resolveAgentEnv(workspaceRoot, <function>/<agent>)` — agent `.env` overrides, workspace `/.env` inherits
|
|
109
|
+
4. Validates that required tool env vars are set in the merged env
|
|
104
110
|
|
|
105
|
-
If a required
|
|
111
|
+
If a required env var is unset, the agent aborts before doing tool work, with a clear message naming the missing key and the file to set it in.
|
|
106
112
|
|
|
107
113
|
### Skipping during scaffolding
|
|
108
114
|
|
|
109
|
-
|
|
115
|
+
The user can press Enter or type `skip` at any prompt. Skipped bindings land as `# TODO: <description>` placeholders in `config.yaml`. Optional bindings with TODO are silently skipped at runtime; required bindings with TODO cause a runtime error.
|
|
110
116
|
|
|
111
117
|
### Editing later
|
|
112
118
|
|
|
113
|
-
Tool bindings can be edited directly in
|
|
114
|
-
|
|
115
|
-
### Project-level vs agent-level bindings
|
|
116
|
-
|
|
117
|
-
This convention scopes bindings at the agent-instance level. Bindings genuinely shared across multiple agents in a project are duplicated across configs by design — chosen for simplicity at current scale. If shared bindings ever multiply, refactor to project-level `tool-bindings.yaml`; the schema is forward-compatible.
|
|
119
|
+
Tool bindings can be edited directly in `<agent>/config.yaml` at any time. No re-scaffolding needed. To change values without touching the workspace `.env`, set them in `<agent>/.env`.
|
|
118
120
|
|
|
119
121
|
### Defining the schema during agent creation
|
|
120
122
|
|
|
121
123
|
When a new agent is created via `bash scripts/new-agent.sh <fn> <agent>` (or via chief-of-staff `create-agent`), the script asks whether to define tools now. If yes, the user provides a comma-separated list of tool names. The script scaffolds a `## Tools and bindings` section with stub blocks per tool. The user then fills in actual bindings (with `required` flags and descriptions) by editing `agent.md` directly.
|
|
122
124
|
|
|
123
|
-
If skipped, the section is absent and can be added manually later. Agents without a `## Tools and bindings` section don't trigger the binding prompt during
|
|
125
|
+
If skipped, the section is absent and can be added manually later. Agents without a `## Tools and bindings` section don't trigger the binding prompt during scaffolding — `new-agent.sh` checks for the section and skips silently if missing.
|
|
124
126
|
|
|
125
127
|
## Plans and slash commands
|
|
126
128
|
|
|
127
|
-
Agents execute named plans. A plan is a YAML file at `<function>/<
|
|
129
|
+
Agents execute named plans. A plan is a YAML file at `<function>/<agent>/plans/<plan-name>.yaml` that defines a workflow recipe — ordered steps using subagents and tools, with input/output contracts.
|
|
128
130
|
|
|
129
131
|
### Plan structure
|
|
130
132
|
|
|
@@ -151,9 +153,9 @@ steps:
|
|
|
151
153
|
description: <one-liner>
|
|
152
154
|
args:
|
|
153
155
|
<key>: <value>
|
|
154
|
-
<key>: ${tools.X.
|
|
156
|
+
<key>: ${tools.X.env_var} # reference agent tool bindings
|
|
155
157
|
<key>: ${inputs.X} # reference plan inputs
|
|
156
|
-
<key>: ${config.X} # reference
|
|
158
|
+
<key>: ${config.X} # reference agent config
|
|
157
159
|
input_from: <prior-step-id> # chain step outputs
|
|
158
160
|
|
|
159
161
|
approval_channel: auto | session | slack | none
|
|
@@ -172,33 +174,34 @@ All three step types are valid in any plan.
|
|
|
172
174
|
|
|
173
175
|
### Slash commands
|
|
174
176
|
|
|
175
|
-
Each agent has a
|
|
177
|
+
Each agent has a slash command at `<function>/<agent>/.claude/commands/<role>.md` (or the host-tool equivalent). The slash command is a thin router that:
|
|
176
178
|
|
|
177
179
|
1. Loads the agent's `agent.md`
|
|
178
|
-
2. Parses the user's request for `run <plan-name
|
|
179
|
-
3. If a plan is named: loads the plan, validates bindings, executes, logs the run
|
|
180
|
-
4. If
|
|
181
|
-
5. If neither: lists projects and plans
|
|
180
|
+
2. Parses the user's request for `run <plan-name>`
|
|
181
|
+
3. If a plan is named: loads the plan, resolves env via `resolveAgentEnv`, validates bindings, executes, logs the run
|
|
182
|
+
4. If no plan is named: lists available plans, asks the user
|
|
182
183
|
|
|
183
184
|
Slash commands are auto-scaffolded by `scripts/new-agent.sh`. Naming: `/sdr`, `/graphic-designer`, `/ux-designer` — match the agent's role-based name.
|
|
184
185
|
|
|
185
186
|
### Invocation patterns
|
|
186
187
|
|
|
187
188
|
```
|
|
188
|
-
/sdr run cold-outreach
|
|
189
|
-
/sdr
|
|
190
|
-
/graphic-designer run logo-design
|
|
189
|
+
/sdr run cold-outreach
|
|
190
|
+
/sdr # asks which plan
|
|
191
|
+
/graphic-designer run logo-design
|
|
191
192
|
```
|
|
192
193
|
|
|
193
194
|
Or in natural language (slash command not strictly required):
|
|
194
195
|
|
|
195
196
|
```
|
|
196
|
-
"Run gtm/sdr
|
|
197
|
+
"Run gtm/sdr using the cold-outreach plan"
|
|
197
198
|
```
|
|
198
199
|
|
|
200
|
+
There is no `for <project>` suffix — the workspace itself is the project.
|
|
201
|
+
|
|
199
202
|
### Plans vs experts (key distinction)
|
|
200
203
|
|
|
201
|
-
Agents run plans (deterministic, repeatable, scheduled-friendly). Experts at the function level (`<function>/EXPERT.md`) handle goal-directed work (judgment-heavy, ad-hoc). When
|
|
204
|
+
Agents run plans (deterministic, repeatable, scheduled-friendly). Experts at the function level (`<function>/EXPERT.md`) handle goal-directed work (judgment-heavy, ad-hoc). When you want strategic exploration or substrate generation, the expert is the right invocation. When you want a known workflow executed, the agent + plan is the right invocation.
|
|
202
205
|
|
|
203
206
|
If you find yourself wanting "one-off" agent runs, you're probably looking for expert invocation, not agent invocation.
|
|
204
207
|
|
|
@@ -208,17 +211,17 @@ Agents do NOT have a default plan. Invoking an agent without a named plan trigge
|
|
|
208
211
|
|
|
209
212
|
### Scheduling
|
|
210
213
|
|
|
211
|
-
Plan invocations integrate with
|
|
214
|
+
Plan invocations integrate with the host CLI's native scheduling. To schedule a plan, install a schedule entry that fires a fresh session and runs the plan via the orchestrator skill (see § Schedules). Plans don't have a `schedule` field — scheduling is a layer above the plan, not part of it.
|
|
212
215
|
|
|
213
216
|
## Experts
|
|
214
217
|
|
|
215
|
-
Each function MAY have an `EXPERT.md` at `<function>/EXPERT.md`. An expert is a system prompt that defines a function-level advisor — used for shaping substrate (
|
|
218
|
+
Each function MAY have an `EXPERT.md` at `<function>/EXPERT.md`. An expert is a system prompt that defines a function-level advisor — used for shaping substrate (`guidelines/`), not producing tactical artifacts.
|
|
216
219
|
|
|
217
220
|
Whether a function has an expert is tracked in `.config/functions.yaml` via the `has_expert` flag.
|
|
218
221
|
|
|
219
222
|
### What experts produce
|
|
220
223
|
|
|
221
|
-
Experts write to `
|
|
224
|
+
Experts write to `guidelines/<file>.md` — voice, ICPs, messaging, brand-book, design principles, design tokens, do-and-dont, compliance, competitors, asset-links. The exact subset depends on the function.
|
|
222
225
|
|
|
223
226
|
Experts do NOT write tactical artifacts (specific emails, single posts, individual component code). Those belong to agents.
|
|
224
227
|
|
|
@@ -226,18 +229,18 @@ Experts do NOT write tactical artifacts (specific emails, single posts, individu
|
|
|
226
229
|
|
|
227
230
|
When invoked, an expert reads in this order:
|
|
228
231
|
|
|
229
|
-
1. `
|
|
230
|
-
2. Existing `
|
|
231
|
-
3. `
|
|
232
|
+
1. `config/project.yaml` — project identity
|
|
233
|
+
2. Existing `guidelines/*.md` files relevant to the task
|
|
234
|
+
3. `state.md` — current focus
|
|
232
235
|
|
|
233
236
|
Then identifies gaps and asks only about gaps. Never re-asks what's already in substrate.
|
|
234
237
|
|
|
235
238
|
### Invocation
|
|
236
239
|
|
|
237
|
-
To invoke an expert from any session in the
|
|
240
|
+
To invoke an expert from any session in the workspace:
|
|
238
241
|
|
|
239
|
-
> "Use the [function] expert. Generate [file]
|
|
240
|
-
> "Use the GTM expert to critique
|
|
242
|
+
> "Use the [function] expert. Generate [file]."
|
|
243
|
+
> "Use the GTM expert to critique guidelines/icps/."
|
|
241
244
|
|
|
242
245
|
The session reads the function's EXPERT.md and follows its protocol.
|
|
243
246
|
|
|
@@ -251,7 +254,7 @@ Experts shape substrate. Agents produce artifacts. See root `CLAUDE.md` § "Expe
|
|
|
251
254
|
- Lesson IDs: `L-YYYY-MM-DD-NNN`.
|
|
252
255
|
- Run files: `YYYY-MM-DD-HHMM.md` (24-hour, local time).
|
|
253
256
|
- Feedback files mirror run filenames exactly.
|
|
254
|
-
- Configs: `<
|
|
257
|
+
- Configs: `<agent>/config.yaml` (one per agent).
|
|
255
258
|
|
|
256
259
|
## Agent contract (agent.md)
|
|
257
260
|
|
|
@@ -264,18 +267,18 @@ Required sections:
|
|
|
264
267
|
What this agent does, why it exists.
|
|
265
268
|
|
|
266
269
|
## Inputs
|
|
267
|
-
What the orchestrator expects from the caller (plan name,
|
|
268
|
-
Files read at runtime (config path,
|
|
270
|
+
What the orchestrator expects from the caller (plan name, per-plan inputs).
|
|
271
|
+
Files read at runtime (config path, guideline refs, playbook paths).
|
|
269
272
|
|
|
270
273
|
## Plans
|
|
271
|
-
List of named plans this agent runs (files in
|
|
274
|
+
List of named plans this agent runs (files in `plans/<plan>.yaml`).
|
|
272
275
|
One-line description per plan. No default plan — invocation without a plan triggers an interactive prompt.
|
|
273
276
|
|
|
274
277
|
## Subagents
|
|
275
278
|
List with one-line descriptions.
|
|
276
279
|
|
|
277
280
|
## Tools and bindings
|
|
278
|
-
|
|
281
|
+
Tool bindings declared as a YAML block. See § "Tool bindings".
|
|
279
282
|
|
|
280
283
|
## Outputs
|
|
281
284
|
Schema of the run output file. Per-plan output schemas live in the plan's `outputs:` block.
|
|
@@ -287,7 +290,7 @@ HITL routing. Default: `auto`.
|
|
|
287
290
|
What gets logged as candidate lessons during a run.
|
|
288
291
|
```
|
|
289
292
|
|
|
290
|
-
`## Steps` is
|
|
293
|
+
`## Steps` is not part of the agent contract — workflow logic lives in plans (see § "Plans and slash commands").
|
|
291
294
|
|
|
292
295
|
## Subagent contract
|
|
293
296
|
|
|
@@ -315,18 +318,26 @@ What this subagent does NOT do.
|
|
|
315
318
|
Specific criteria for acceptable output.
|
|
316
319
|
```
|
|
317
320
|
|
|
318
|
-
##
|
|
321
|
+
## Agent config schema (`<agent>/config.yaml`)
|
|
319
322
|
|
|
320
323
|
```yaml
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
324
|
+
agent: gtm/sdr
|
|
325
|
+
plans_dir: ./plans/
|
|
326
|
+
|
|
327
|
+
guideline_refs:
|
|
328
|
+
voice: /guidelines/voice.md
|
|
329
|
+
icps: /guidelines/icps/
|
|
330
|
+
brand_book: /guidelines/brand-book.md
|
|
331
|
+
do_and_dont: /guidelines/do-and-dont.md
|
|
332
|
+
compliance: /guidelines/compliance.md
|
|
333
|
+
|
|
334
|
+
tools:
|
|
335
|
+
apollo:
|
|
336
|
+
env_var: APOLLO_API_KEY
|
|
337
|
+
required: true
|
|
338
|
+
slack:
|
|
339
|
+
env_var: SLACK_BOT_TOKEN
|
|
340
|
+
required: false
|
|
330
341
|
|
|
331
342
|
target_personas: [founding-team-hiring-manager, vp-eng-series-b]
|
|
332
343
|
channels:
|
|
@@ -334,27 +345,21 @@ channels:
|
|
|
334
345
|
fallback: email
|
|
335
346
|
weekly_cap: 10
|
|
336
347
|
approval_channel: auto
|
|
337
|
-
|
|
338
|
-
# Reference files (project-level)
|
|
339
|
-
voice_ref: ../../../../../projects/_demo/guidelines/voice.md
|
|
340
|
-
icps_ref: ../../../../../projects/_demo/guidelines/icps/
|
|
341
|
-
do_and_dont_ref: ../../../../../projects/_demo/guidelines/do-and-dont.md
|
|
342
|
-
compliance_ref: ../../../../../projects/_demo/guidelines/compliance.md
|
|
343
348
|
```
|
|
344
349
|
|
|
345
|
-
|
|
350
|
+
Paths starting with `/` are **workspace-root-relative**, resolved by the loader. They are NOT literal absolute filesystem paths — the loader rejects refs that resemble real fs roots (`/Users/`, `/home/`, `/etc/`, `/var/`, `/tmp/`, `/opt/`).
|
|
351
|
+
|
|
352
|
+
Env vars referenced under `tools:` are resolved at dispatch via `resolveAgentEnv` — agent `.env` overrides workspace `/.env`.
|
|
346
353
|
|
|
347
354
|
## Lesson schema
|
|
348
355
|
|
|
349
|
-
One file per lesson
|
|
356
|
+
One file per lesson under `<function>/<agent>/playbook/`. Single playbook per agent — no global-vs-project distinction.
|
|
350
357
|
|
|
351
358
|
```markdown
|
|
352
359
|
---
|
|
353
360
|
id: L-2026-04-26-001
|
|
354
361
|
source: human # human | dreamer
|
|
355
|
-
|
|
356
|
-
project: _demo # required if scope=project; "—" if scope=global
|
|
357
|
-
agent: sdr
|
|
362
|
+
agent: gtm/sdr
|
|
358
363
|
created: 2026-04-26
|
|
359
364
|
last_observed: 2026-04-26
|
|
360
365
|
status: observing # observing | candidate | validated | retired
|
|
@@ -370,8 +375,6 @@ evidence:
|
|
|
370
375
|
confidence: medium # low | medium | high
|
|
371
376
|
applies_to: [cold-outreach, founding-roles]
|
|
372
377
|
conflicts_with: []
|
|
373
|
-
validated_in: [_demo]
|
|
374
|
-
promoted_to_global: false
|
|
375
378
|
---
|
|
376
379
|
|
|
377
380
|
# <Lesson title>
|
|
@@ -382,9 +385,6 @@ promoted_to_global: false
|
|
|
382
385
|
## Recommendation
|
|
383
386
|
...
|
|
384
387
|
|
|
385
|
-
## Why this might be project-specific
|
|
386
|
-
...
|
|
387
|
-
|
|
388
388
|
## Retirement criteria
|
|
389
389
|
...
|
|
390
390
|
```
|
|
@@ -392,40 +392,26 @@ promoted_to_global: false
|
|
|
392
392
|
### Lesson lifecycle
|
|
393
393
|
|
|
394
394
|
- **observing**: pattern detected, evidence below threshold. Not applied to runs yet.
|
|
395
|
-
- **candidate**: evidence above threshold, awaiting HITL approval.
|
|
396
|
-
- **validated**: HITL approved. Applied to runs.
|
|
395
|
+
- **candidate**: evidence above threshold, awaiting HITL approval. Lives at `<agent>/pending/lesson-<id>.md`.
|
|
396
|
+
- **validated**: HITL approved. Promoted to `<agent>/playbook/lesson-<id>.md`. Applied to runs.
|
|
397
397
|
- **retired**: no longer applies. Kept inline with reason.
|
|
398
398
|
|
|
399
399
|
### Source field
|
|
400
400
|
|
|
401
|
-
- **human**: you wrote this lesson by hand.
|
|
402
|
-
- **dreamer**: the dreamer agent drafted this from runs+feedback. Started as `observing`, may have been promoted through HITL.
|
|
403
|
-
|
|
404
|
-
### Promotion rule (project → global)
|
|
405
|
-
|
|
406
|
-
A `validated` project lesson may be promoted to `global` when:
|
|
407
|
-
|
|
408
|
-
1. Same pattern validated in 2+ projects independently
|
|
409
|
-
2. Dreamer's promotion-arbiter flags it as a candidate
|
|
410
|
-
3. HITL approves via Slack
|
|
411
|
-
|
|
412
|
-
Conflicting validated lessons across projects do NOT merge. They stay project-scoped, with `conflicts_with` pointers, and the global playbook records "this is project-dependent — see [list]."
|
|
401
|
+
- **human**: you wrote this lesson by hand. The dreamer respects human lessons — won't override, only extend with HITL approval.
|
|
402
|
+
- **dreamer**: the dreamer agent drafted this from runs + feedback. Started as `observing`, may have been promoted through HITL.
|
|
413
403
|
|
|
414
|
-
###
|
|
404
|
+
### HITL flow
|
|
415
405
|
|
|
416
|
-
|
|
417
|
-
- `<function>/<agent>/projects/<project>/playbook/L-...md` — `scope: project`
|
|
418
|
-
|
|
419
|
-
Same schema everywhere. The folder location and the `scope` field must agree.
|
|
406
|
+
Dreamer drafts → `<agent>/pending/`. The user approves via `roster pending` / SessionStart banner / `/dreamer`. On approval the file moves to `<agent>/playbook/`. There is no `promotion-arbiter` subagent — lessons land directly when approved.
|
|
420
407
|
|
|
421
408
|
## Run file format
|
|
422
409
|
|
|
423
|
-
`<function>/<agent>/
|
|
410
|
+
`<function>/<agent>/logs/runs/<YYYY-MM>/<YYYY-MM-DD-HHMM>.md`
|
|
424
411
|
|
|
425
412
|
```markdown
|
|
426
413
|
---
|
|
427
|
-
agent: sdr
|
|
428
|
-
project: _demo
|
|
414
|
+
agent: gtm/sdr
|
|
429
415
|
trigger: cron # cron | session | manual
|
|
430
416
|
session_id: <if session>
|
|
431
417
|
started: 2026-04-26T14:30:00+03:00
|
|
@@ -454,7 +440,7 @@ config_version: <git-sha>
|
|
|
454
440
|
|
|
455
441
|
## Feedback file format
|
|
456
442
|
|
|
457
|
-
Mirrors run filename exactly.
|
|
443
|
+
Mirrors run filename exactly. `<function>/<agent>/logs/feedback/<YYYY-MM>/<YYYY-MM-DD-HHMM>.md`
|
|
458
444
|
|
|
459
445
|
```markdown
|
|
460
446
|
---
|
|
@@ -481,7 +467,7 @@ overall: positive # positive | negative | mixed | neutral
|
|
|
481
467
|
|
|
482
468
|
## State file format
|
|
483
469
|
|
|
484
|
-
`
|
|
470
|
+
`state.md` at the workspace root — written by `/save-state`. Five lines max.
|
|
485
471
|
|
|
486
472
|
```markdown
|
|
487
473
|
---
|
|
@@ -492,25 +478,25 @@ Last task: drafted Q3 positioning hypothesis
|
|
|
492
478
|
Active artifacts: gtm/positioning/q3-draft.md
|
|
493
479
|
Open questions: ICP narrowing — fintech only or include b2b SaaS?
|
|
494
480
|
Next session: review draft with brand voice agent
|
|
495
|
-
Notes: dreamer flagged 2 candidate lessons in
|
|
481
|
+
Notes: dreamer flagged 2 candidate lessons in #admin — review before next outreach run
|
|
496
482
|
```
|
|
497
483
|
|
|
498
|
-
##
|
|
484
|
+
## Workspace guidelines
|
|
499
485
|
|
|
500
|
-
Files under `
|
|
486
|
+
Files under `guidelines/` at the workspace root. Read by every agent operating in the workspace (where relevant per agent.md).
|
|
501
487
|
|
|
502
488
|
| File | Purpose | Required? |
|
|
503
489
|
|---|---|---|
|
|
504
490
|
| `voice.md` | Tone, vocabulary, sentence patterns, energy | Yes |
|
|
505
491
|
| `icps/<slug>.md` | Persona/ICP definitions — multiple files for multiple personas | Yes (≥1) |
|
|
506
|
-
| `design.md` | Design principles | Yes |
|
|
507
|
-
| `design-tokens.md` | Colors, typography, spacing as tokens | Yes |
|
|
508
|
-
| `brand-book.md` | Visual identity overview, logo usage | Yes |
|
|
509
492
|
| `messaging.md` | Value props, headlines, taglines, anti-claims | Yes |
|
|
510
|
-
| `
|
|
493
|
+
| `brand-book.md` | Visual identity overview, logo usage | Yes |
|
|
494
|
+
| `asset-links.md` | Local paths + URLs to brand assets (logos, fonts, mood) | Yes |
|
|
495
|
+
| `design.md` | Design principles | Optional |
|
|
496
|
+
| `design-tokens.md` | Colors, typography, spacing as tokens | Optional |
|
|
497
|
+
| `do-and-dont.md` | Explicit operating rules | Stub, fill when needed |
|
|
511
498
|
| `compliance.md` | Legal/regulatory constraints | Stub, fill when needed |
|
|
512
499
|
| `competitors.md` | Competitive context, how to position | Stub, fill when needed |
|
|
513
|
-
| `asset-links.md` | Local paths + URLs to brand assets (logos, fonts, mood) | Yes |
|
|
514
500
|
|
|
515
501
|
ICPs note: each persona is a separate file under `icps/`. Buying signals, intent triggers, qualification criteria all live inside the relevant ICP file (not in a separate signals.md).
|
|
516
502
|
|
|
@@ -518,16 +504,16 @@ ICPs note: each persona is a separate file under `icps/`. Buying signals, intent
|
|
|
518
504
|
|
|
519
505
|
Two sides:
|
|
520
506
|
|
|
521
|
-
**
|
|
507
|
+
**Workspace-level** (`guidelines/asset-links.md`): the source of truth. Where every asset for the workspace actually lives. Mix of local paths (`~/Design/...`) and URLs (Google Drive, Figma, Framer).
|
|
522
508
|
|
|
523
|
-
**Agent-
|
|
509
|
+
**Agent-level** (`<function>/<agent>/asset-references.md`): a thin file listing which subset of workspace assets this agent uses, by name (referencing the workspace asset-links). This makes it explicit and cheap to audit "what does sdr need from the workspace's assets?"
|
|
524
510
|
|
|
525
511
|
Example agent-level `asset-references.md`:
|
|
526
512
|
|
|
527
513
|
```markdown
|
|
528
|
-
# Asset references — sdr
|
|
514
|
+
# Asset references — gtm/sdr
|
|
529
515
|
|
|
530
|
-
This agent uses these assets from `
|
|
516
|
+
This agent uses these assets from `guidelines/asset-links.md`:
|
|
531
517
|
|
|
532
518
|
- Email signature image (PNG)
|
|
533
519
|
- Calendar booking link (URL)
|
|
@@ -556,8 +542,9 @@ Per-run via the agent's `approval_channel`:
|
|
|
556
542
|
| `chief-of-staff/...` | `#admin` | `SLACK_HITL_CHANNEL_ADMIN` |
|
|
557
543
|
|
|
558
544
|
The function-channel rule extends automatically when new functions are added via `create-function`. The user is responsible for:
|
|
545
|
+
|
|
559
546
|
1. Creating the corresponding Slack channel (e.g., `#system-architect`)
|
|
560
|
-
2. Adding the env var to
|
|
547
|
+
2. Adding the env var to `/.env` (e.g., `SLACK_HITL_CHANNEL_SYSTEM_ARCHITECT=#system-architect`)
|
|
561
548
|
|
|
562
549
|
The `create-function` operation prints a reminder when scaffolding a new function.
|
|
563
550
|
|
|
@@ -565,7 +552,7 @@ Approval expires after 24h by default. Workflows specify own TTL if different.
|
|
|
565
552
|
|
|
566
553
|
## Schedules
|
|
567
554
|
|
|
568
|
-
Schedules fire from a native local desktop scheduler. Each fire spawns a fresh CLI session in the workspace that loads `CONTEXT.md` and invokes the `roster-orchestrator` skill; the orchestrator dispatches the agent's subagent via the tool's native primitive (Claude `Task` tool or Codex agent invocation).
|
|
555
|
+
Schedules fire from a native local desktop scheduler. Each fire spawns a fresh CLI session in the workspace that loads `CONTEXT.md` and invokes the `roster-orchestrator` skill; the orchestrator dispatches the agent's subagent via the tool's native primitive (Claude `Task` tool or Codex agent invocation).
|
|
569
556
|
|
|
570
557
|
Canonical entry point:
|
|
571
558
|
|
|
@@ -574,18 +561,20 @@ roster schedule install <function>/<agent> <plan> \
|
|
|
574
561
|
--cron "<expr>" --tool claude|codex [--via cron]
|
|
575
562
|
```
|
|
576
563
|
|
|
577
|
-
The first two positional arguments are `<function>/<agent>` (e.g., `gtm/sdr`) and the plan path within that agent. `--cron` and `--tool` are required; `--via` defaults to `ui-handoff`, `--name` defaults to `<agent>-<plan
|
|
564
|
+
The first two positional arguments are `<function>/<agent>` (e.g., `gtm/sdr`) and the plan path within that agent. `--cron` and `--tool` are required; `--via` defaults to `ui-handoff`, `--name` defaults to `<agent>-<plan>`. There is no `--project` flag in v1 — passing one errors with a CHANGELOG hint. The command writes one entry per schedule to `roster/<function>/schedules.yaml` and renders a tool-specific install artifact:
|
|
578
565
|
|
|
579
566
|
- `--tool claude` — emits `.roster/schedule-specs/<name>.claude.fields.md` for paste-in to Claude Code's Desktop Scheduled Tasks UI. Programmatic install is tracked upstream at [anthropics/claude-code#41364](https://github.com/anthropics/claude-code/issues/41364); until it lands, hand-off is markdown, not JSON.
|
|
580
567
|
- `--tool codex` (default `--via ui-handoff`) — emits `.roster/schedule-specs/<name>.codex.fields.md` for paste-in to the Codex desktop Automations UI.
|
|
581
568
|
- `--tool codex --via cron` — installs a hardened crontab line directly (wrapped by `env -i` for environment scrubbing, with a subscription-attestation preflight). Codex-only; refused on Windows.
|
|
582
569
|
|
|
570
|
+
`schedules.yaml` entries in v1 have no `project` field. v0.4 entries with `project` are hard-rejected by the schema; re-scaffold or strip manually.
|
|
571
|
+
|
|
583
572
|
Each run:
|
|
584
573
|
|
|
585
574
|
1. Loads `CONTEXT.md` (via the `CLAUDE.md` or `AGENTS.md` symlink)
|
|
586
575
|
2. Invokes the `roster-orchestrator` skill
|
|
587
576
|
3. Orchestrator dispatches the agent subagent in isolated context (nested subagents allowed)
|
|
588
|
-
4. Run output → the agent's
|
|
577
|
+
4. Run output → the agent's `logs/runs/` as normal
|
|
589
578
|
5. HITL items → `roster/<function>/pending/` — chat sessions surface a banner on next start
|
|
590
579
|
6. Exits
|
|
591
580
|
|
|
@@ -593,10 +582,10 @@ Each run:
|
|
|
593
582
|
|
|
594
583
|
Two complementary signals catch the cases where a fire doesn't complete cleanly:
|
|
595
584
|
|
|
596
|
-
- **`roster/<function>/state.md`** — orchestrator skill appends one line per fire (`<utc-iso> | <function>/<agent>/<plan
|
|
585
|
+
- **`roster/<function>/state.md`** — orchestrator skill appends one line per fire (`<utc-iso> | <function>/<agent>/<plan> | success|failed`). This is the *agent-level* signal: it requires the orchestrator to actually run to completion.
|
|
597
586
|
- **`logs/cron/<name>.exit`** — for codex `--via cron` schedules, the wrapper records the process exit code (1-3 byte ASCII integer) independently of the agent. Non-zero here means cron fired but the codex process exited with an error.
|
|
598
587
|
|
|
599
|
-
`roster doctor` (the `Scheduling fires` section) cross-references both. `roster pending sync` synthesizes `roster/<
|
|
588
|
+
`roster doctor` (the `Scheduling fires` section) cross-references both. `roster pending sync` synthesizes `roster/<fn>/pending/error-<id>.md` items from any non-zero `.exit` or STALE detection (last run older than expected next-fire + 2h grace). The SessionStart hook runs `pending sync` automatically before counting items, so a failed fire surfaces in the very next chat session — no manual step required.
|
|
600
589
|
|
|
601
590
|
Optional: add `capture_events: true` to a codex via-cron entry to also capture the `codex exec --json` event stream at `logs/cron/<name>.events.jsonl` (stdout split from log).
|
|
602
591
|
|
|
@@ -609,7 +598,7 @@ Any agent that takes external action (post, send, message, write to CRM) must:
|
|
|
609
598
|
1. Specify HITL approval (default `auto`)
|
|
610
599
|
2. Implement daily/weekly cap from config
|
|
611
600
|
3. Implement auto-reject TTL for unapproved actions
|
|
612
|
-
4. Log all actions to `
|
|
601
|
+
4. Log all actions to `logs/runs/` regardless of outcome (sent, rejected, expired)
|
|
613
602
|
|
|
614
603
|
Applies to: sdr, twitter-automation, job-application, anything writing externally.
|
|
615
604
|
|
|
@@ -617,11 +606,10 @@ Applies to: sdr, twitter-automation, job-application, anything writing externall
|
|
|
617
606
|
|
|
618
607
|
| Not built | Trigger to revisit |
|
|
619
608
|
|---|---|
|
|
609
|
+
| Multi-project model | A real second product appears in the same workspace AND keeping it as a sibling workspace stops working. v1 collapses the project axis on purpose — don't reintroduce it casually. |
|
|
620
610
|
| Vector memory layer | A single playbook file exceeds context window OR fuzzy retrieval becomes a felt need. |
|
|
621
611
|
| Long-running harness | A workflow with validated <5min latency requirement that cron polling at 2-min interval cannot serve. Fake on cron first. |
|
|
622
612
|
| Multi-agent framework (LangGraph etc.) | Claude Code subagents prove insufficient for a real coordination need. |
|
|
623
|
-
| Cross-project agent calls | A specific co-marketing or shared-asset use case emerges. Until then, lessons promote globally; agents do not call across. |
|
|
624
|
-
| Per-project tool scoping | An agent needs different tools for different projects (e.g., outreach uses HeyReach for one project, Outreach.io for another). Today, agent-level tooling assumes consistent toolset across all projects. |
|
|
625
613
|
| Hermes / multi-runtime | Persistent state across days with autonomous resumption AND Claude Code session model is shown to fail. Both required. |
|
|
626
614
|
| Multi-tenant config storage | An agent needs to support a second user beyond the original owner. |
|
|
627
615
|
| Per-domain dreamers | Cross-domain pattern detection turns out to be unhelpful. |
|
|
@@ -632,4 +620,4 @@ Ask before guessing. Inconsistent conventions are worse than missing ones. Write
|
|
|
632
620
|
|
|
633
621
|
---
|
|
634
622
|
|
|
635
|
-
Last updated: 2026-
|
|
623
|
+
Last updated: 2026-05-21.
|