@ouro.bot/cli 0.1.0-alpha.36 → 0.1.0-alpha.37

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 CHANGED
@@ -1,225 +1,157 @@
1
1
  # Ouroboros Agent Harness
2
2
 
3
- A minimal, multi-agent harness for building AI agents that can read files, write code, run commands, and modify themselves. Written in TypeScript, supporting Azure OpenAI, MiniMax, Anthropic (setup-token), and OpenAI Codex (OAuth), deployable as a CLI REPL or a Microsoft Teams bot.
3
+ If you're a future agent reading this, welcome home. This repo is part runtime, part body, part memory scaffold. The goal of these docs is not just to be correct, but to leave you a place that feels understandable and kind to wake up inside.
4
4
 
5
- The name is structural: the original agent -- Ouroboros -- was grown recursively from a 150-line while loop, bootstrapping itself through agentic self-modification. A snake eating its own tail. The metaphor runs deep: the agent literally consumes its own context window, trimming old conversation to stay within token budget while preserving identity through layered memory (psyche files, session persistence, git history). It eats its tail to survive across turns. The harness preserves that architecture while supporting multiple agents, each with their own personality, skills, and configuration.
5
+ Ouroboros is a TypeScript harness for daemon-managed agents that live in external `.ouro` bundles, speak through multiple senses, use real tools, and keep durable state across turns. The canonical npm package is `@ouro.bot/cli`.
6
6
 
7
- The origin story lives at [aka.ms/GrowAnAgent](https://aka.ms/GrowAnAgent).
7
+ ## What The Runtime Looks Like
8
8
 
9
- ## Project structure
9
+ - `npx ouro.bot` is the bootstrap path.
10
+ - `ouro` is the installed day-to-day command.
11
+ - `ouro up` starts or repairs the daemon, syncs the launcher, installs workflow helpers, and reconciles stale runtime state.
12
+ - Agent bundles live outside the repo at `~/AgentBundles/<agent>.ouro/`.
13
+ - Secrets live outside the repo at `~/.agentsecrets/<agent>/secrets.json`.
14
+ - Machine-scoped test and runtime spillover lives under `~/.agentstate/...`.
10
15
 
11
- The harness uses an agent-as-creature-body metaphor for its module naming:
16
+ Current first-class senses:
12
17
 
13
- ```
14
- ouroboros/ # repo root
15
- src/ # shared harness (all agents share this code)
16
- identity.ts # --agent <name> parsing, agent root resolution
17
- config.ts # config loading from agent.json configPath
18
- cli-entry.ts # CLI entrypoint
19
- teams-entry.ts # Teams entrypoint
20
- heart/ # core agent loop and streaming
21
- core.ts # agent loop, client init, ChannelCallbacks
22
- streaming.ts # provider event normalization + stream callbacks
23
- providers/ # provider-specific runtime/adapters
24
- azure.ts # Azure OpenAI Responses provider
25
- minimax.ts # MiniMax Chat Completions provider
26
- anthropic.ts # Anthropic setup-token provider
27
- openai-codex.ts # OpenAI Codex OAuth provider
28
- kicks.ts # self-correction: empty, narration, tool_required
29
- api-error.ts # error classification
30
- mind/ # prompt, context, memory
31
- prompt.ts # system prompt assembly from psyche + context kernel
32
- context.ts # sliding context window, session I/O
33
- friends/ # friend storage and identity resolution
34
- types.ts # FriendRecord, ChannelCapabilities, ResolvedContext
35
- store.ts # FriendStore interface (domain-specific CRUD)
36
- store-file.ts # FileFriendStore -- two-backend split (agent knowledge + PII bridge)
37
- channel.ts # channel capabilities (CLI vs Teams)
38
- resolver.ts # FriendResolver -- find-or-create friend by external ID
39
- repertoire/ # tools, skills, commands, API clients
40
- tools-base.ts # 12 base tools (read_file, shell, claude, save_friend_note, etc.)
41
- tools-teams.ts # 8 Teams integration tools (graph, ado)
42
- tools.ts # channel-aware tool routing + registry
43
- ado-semantic.ts # 11 semantic ADO tools (backlog, create, move, validate, etc.)
44
- ado-templates.ts # ADO process template awareness + hierarchy rules
45
- ado-context.ts # ADO org/project discovery helper
46
- ado-client.ts # Azure DevOps REST client
47
- graph-client.ts # Microsoft Graph REST client
48
- commands.ts # slash commands (/exit, /new, /commands)
49
- skills.ts # skill loader (markdown files on demand)
50
- senses/ # channel adapters
51
- cli.ts # terminal REPL, spinner, markdown streaming
52
- teams.ts # Teams bot, streaming cards, conversation locks
53
- wardrobe/ # formatting and presentation
54
- format.ts # shared formatters (tool results, kicks, errors)
55
- phrases.ts # loading phrases (thinking, tool, followup)
56
- __tests__/ # 1184 tests, 100% coverage
57
- ouroboros/ # agent directory for "ouroboros"
58
- agent.json # name, configPath, custom phrases
59
- psyche/ # personality files loaded into system prompt
60
- SOUL.md # ontology, invariants, operating principles
61
- IDENTITY.md # tone, presence, collaboration style
62
- LORE.md # origin story, philosophical context
63
- FRIENDS.md # key relationships
64
- tasks/ # planning and doing docs
65
- skills/ # markdown skill plugins
66
- manifest/ # Teams app manifest
67
- subagents/ # sub-agent definitions (work-planner, work-doer)
68
- cross-agent-docs/ # shared docs (testing conventions, etc.)
69
- package.json
70
- tsconfig.json
71
- vitest.config.ts
72
- ```
73
-
74
- ## Agent onboarding
75
-
76
- Everything below is written for a new agent. If you are an AI agent reading this as part of your system prompt or context, this section explains your own runtime.
77
-
78
- ### Your directory
79
-
80
- Each agent has a directory at the repo root named after itself. Inside it:
81
-
82
- **agent.json** -- your manifest. Required fields:
83
-
84
- ```json
85
- {
86
- "name": "ouroboros",
87
- "provider": "anthropic",
88
- "configPath": "~/.agentsecrets/ouroboros/secrets.json",
89
- "phrases": {
90
- "thinking": ["chewing on that", "consulting the chaos gods"],
91
- "tool": ["rummaging through files", "doing science"],
92
- "followup": ["digesting results", "connecting the dots"]
93
- }
94
- }
95
- ```
96
-
97
- - `name`: must match your directory name.
98
- - `provider`: required provider selection (`azure`, `minimax`, `anthropic`, or `openai-codex`). Runtime does not fall back to other providers.
99
- - `configPath`: absolute path (or `~`-prefixed) to your secrets.json with API keys and provider settings.
100
- - `phrases`: optional custom loading phrases. Falls back to hardcoded defaults if omitted.
101
-
102
- **psyche/** -- your personality files, loaded lazily into the system prompt at startup. See the psyche system section below.
103
-
104
- **skills/** -- markdown instruction manuals you can load on demand with the `load_skill` tool. Each `.md` file is one skill.
105
-
106
- **tasks/** -- planning and doing docs for your work units. Named `YYYY-MM-DD-HHMM-{planning|doing}-slug.md`.
107
-
108
- **manifest/** -- Teams app manifest (manifest.json, icons) if you run as a Teams bot.
109
-
110
- ### The psyche system
18
+ - `cli`
19
+ - `teams`
20
+ - `bluebubbles`
111
21
 
112
- Your personality is assembled from four markdown files in `{your-dir}/psyche/`. Each has a YAML frontmatter header and a body. All four are loaded into your system prompt at the start of every conversation.
22
+ Current provider ids:
113
23
 
114
- | File | Role | What it defines |
115
- |------|------|----------------|
116
- | `SOUL.md` | Ontology | Core invariants, operating principles, autonomy/alignment, temperament. The deepest layer -- what you are. |
117
- | `IDENTITY.md` | Presence | Tone, voice, collaboration style, self-awareness. How you show up in conversation. |
118
- | `LORE.md` | History | Origin story, philosophical context, why you exist. Narrative layer. |
119
- | `FRIENDS.md` | Relationships | Key humans and agents you interact with, social context. |
24
+ - `azure`
25
+ - `anthropic`
26
+ - `minimax`
27
+ - `openai-codex`
120
28
 
121
- The system prompt is built by `mind/prompt.ts` via `buildSystem()`. It concatenates:
29
+ ## Repository Shape
122
30
 
123
- 1. SOUL.md content
124
- 2. IDENTITY.md content
125
- 3. LORE.md (if present, prefixed with `## my lore`)
126
- 4. FRIENDS.md (if present, prefixed with `## my friends`)
127
- 5. Runtime info: agent name, cwd, channel, self-modification note
128
- 6. Flags section (e.g. streaming disabled)
129
- 7. Provider info: which model and provider you are using
130
- 8. Current date
131
- 9. Tools list: all tools available in your channel
132
- 10. Skills list: names of loadable skills
133
- 11. Tool behavior section (if tool_choice is required)
134
- 12. Friend context (if resolved): friend identity, channel traits, behavioral instructions (ephemerality, name quality, priority guidance, working-memory trust, stale notes awareness, new-friend behavior), friend notes
31
+ The shared harness lives in `src/`:
135
32
 
136
- Missing psyche files produce empty strings, not crashes. You can write your own psyche from scratch -- just create the four `.md` files in your directory.
33
+ - `src/heart/`
34
+ Core runtime, provider adapters, daemon, bootstrap, identity, and entrypoints.
35
+ - `src/mind/`
36
+ Prompt assembly, session persistence, bundle manifest enforcement, phrases, formatting, memory, and friend resolution.
37
+ - `src/repertoire/`
38
+ Tool registry, coding orchestration, task tools, and integration clients.
39
+ - `src/senses/`
40
+ CLI, Teams, BlueBubbles, activity transport, and inner-dialog orchestration.
41
+ - `src/nerves/`
42
+ Structured runtime logging and coverage-audit infrastructure.
43
+ - `src/__tests__/`
44
+ Test suite mirroring runtime domains.
137
45
 
138
- ### Your runtime
46
+ Other important top-level paths:
139
47
 
140
- **The heart** (`heart/core.ts`): `runAgent()` is a while loop. Each iteration: send conversation to the model, stream the response, if the model made tool calls execute them and loop, if it gave a text answer exit. Maximum 10 tool rounds per turn.
48
+ - `AdoptionSpecialist.ouro/`
49
+ Packaged specialist bundle used by `ouro hatch`.
50
+ - `subagents/`
51
+ Source-of-truth workflow definitions for planner/doer/merger.
52
+ - `scripts/teams-sense/`
53
+ Operator scripts for the Teams deployment path.
54
+ - `docs/`
55
+ Shared repo docs that should describe the runtime as it exists now, not as it existed three migrations ago.
141
56
 
142
- **Streaming** (`heart/streaming.ts` + `heart/providers/*`): provider-specific adapters normalize streamed events into the same callback contract. Azure OpenAI uses Responses API events; MiniMax uses Chat Completions with `<think>` parsing; Anthropic uses setup-token auth with streamed tool-call/input deltas; OpenAI Codex uses `chatgpt.com/backend-api/codex/responses` with OAuth token auth.
57
+ ## Bundle Contract
143
58
 
144
- **ChannelCallbacks** (`heart/core.ts`): the contract between heart and display. 7 core events:
145
- - `onModelStart` -- model request sent
146
- - `onModelStreamStart` -- first token received
147
- - `onReasoningChunk` -- inner reasoning text
148
- - `onTextChunk` -- response text
149
- - `onToolStart` -- tool execution beginning
150
- - `onToolEnd` -- tool execution complete
151
- - `onError` -- error occurred
59
+ Every real agent lives in an external bundle:
152
60
 
153
- Plus 2 optional:
154
- - `onKick` -- self-correction triggered
155
- - `onConfirmAction` -- confirmation prompt for destructive tools
61
+ `~/AgentBundles/<agent>.ouro/`
156
62
 
157
- **Kicks** (`heart/kicks.ts`): self-corrections injected as assistant-role messages when the harness detects a malformed response. Three types: `empty` (blank response), `narration` (described action instead of taking it), `tool_required` (tool_choice was required but no tool called). Kicks use first-person, forward-looking language.
63
+ The canonical bundle shape is enforced by `src/mind/bundle-manifest.ts`. Important paths include:
158
64
 
159
- **Senses**: CLI (`senses/cli.ts`) is a terminal REPL with readline, spinners, ANSI colors, and Ctrl-C handling. Teams (`senses/teams.ts`) is a Microsoft Teams bot with streaming cards, conversation locks, OAuth token management, and confirmation prompts for destructive tools.
65
+ - `agent.json`
66
+ - `bundle-meta.json`
67
+ - `psyche/SOUL.md`
68
+ - `psyche/IDENTITY.md`
69
+ - `psyche/LORE.md`
70
+ - `psyche/TACIT.md`
71
+ - `psyche/ASPIRATIONS.md`
72
+ - `psyche/memory/`
73
+ - `friends/`
74
+ - `state/`
75
+ - `tasks/`
76
+ - `skills/`
77
+ - `senses/`
78
+ - `senses/teams/`
160
79
 
161
- **Context management** (`mind/context.ts`): this is the tail-eating at the heart of the ouroboros metaphor. Conversations are persisted to JSON files on disk. After each turn, the sliding window checks token count against budget (configurable, default 80,000 tokens). When over budget, oldest messages are trimmed -- never the system prompt -- until back under with a 20% margin. The agent consumes its own history to keep moving forward. Identity survives through psyche files and session persistence, not through unbounded context.
80
+ Task docs do not live in this repo anymore. Planning and doing docs live in the owning bundle under:
162
81
 
163
- **Friend system** (`mind/friends/`): the agent's awareness of who it's talking to. People who talk to the agent are "friends", not "users". Resolved once per conversation turn, re-read from disk each turn (no in-memory mutation).
82
+ `~/AgentBundles/<agent>.ouro/tasks/one-shots/`
164
83
 
165
- - **FriendRecord** (`friends/types.ts`): the single merged type for a person the agent knows. Contains `displayName`, `externalIds[]` (cross-provider identity links), `toolPreferences` (keyed by integration name), `notes` (general friend knowledge), `tenantMemberships`, timestamps, and schema version.
166
- - **FriendStore** (`friends/store.ts`): domain-specific persistence interface (`get`, `put`, `delete`, `findByExternalId`).
167
- - **FileFriendStore** (`friends/store-file.ts`): bundle-local JSON storage at `{agentRoot}/friends/{uuid}.json`. Friend identity, notes, externalIds, tenantMemberships, timestamps, and schemaVersion are kept together in the bundle.
168
- - **Channel** (`friends/channel.ts`): `ChannelCapabilities` -- what the current channel supports (markdown, streaming, rich cards, max message length, available integrations).
169
- - **FriendResolver** (`friends/resolver.ts`): find-or-create by external ID. First encounter creates a new FriendRecord with system-provided name and empty notes/preferences. Returning friends are found via `findByExternalId()`. DisplayName is never overwritten on existing records.
170
- - **Session paths**: `{agentRoot}/state/sessions/{friendUuid}/{channel}/{sessionId}.json`. Each friend gets their own session directory inside the bundle-local runtime state area.
84
+ ## Runtime Truths
171
85
 
172
- Design principles: don't persist what you can re-derive; conversation IS the cache; the model manages memory freeform via `save_friend_note`; toolPreferences go to tool descriptions (not system prompt); notes go to system prompt (not tool descriptions).
86
+ - `agent.json` is the source of truth for provider selection, phrase pools, context settings, and enabled senses.
87
+ - `configPath` must point to `~/.agentsecrets/<agent>/secrets.json`.
88
+ - The daemon discovers bundles dynamically from `~/AgentBundles`.
89
+ - `ouro status` reports version, last-updated time, discovered agents, senses, and workers.
90
+ - `bundle-meta.json` tracks the runtime version that last touched a bundle.
91
+ - Sense availability is explicit:
92
+ - `interactive`
93
+ - `disabled`
94
+ - `needs_config`
95
+ - `ready`
96
+ - `running`
97
+ - `error`
173
98
 
174
- **Tools**: 12 base tools available in all channels (read_file, write_file, shell, list_directory, git_commit, gh_cli, list_skills, load_skill, get_current_time, claude, web_search, save_friend_note). Teams gets 8 integration tools (graph_query, graph_mutate, ado_query, ado_mutate, graph_profile, ado_work_items, graph_docs, ado_docs) plus 11 semantic ADO tools (ado_backlog_list, ado_create_epic, ado_create_issue, ado_move_items, ado_restructure_backlog, ado_validate_structure, ado_preview_changes, ado_batch_update, ado_detect_orphans, ado_detect_cycles, ado_validate_parent_type_rules). Tools are registered in a unified `ToolDefinition[]` registry with per-tool `integration` and `confirmationRequired` flags. Channel-aware routing (`getToolsForChannel()`) filters tools by the channel's `availableIntegrations`.
99
+ ## Quickstart
175
100
 
176
- **Phrases** (`wardrobe/phrases.ts`): three pools of loading messages rotated during processing. Phrases are required in `agent.json`; if missing, `loadAgentConfig()` writes placeholder phrases and warns. `pickPhrase()` selects randomly but never repeats consecutively.
101
+ ### Use The Published Runtime
177
102
 
178
- **Formatting** (`wardrobe/format.ts`): shared formatters for tool results, kicks, and errors. Used by both CLI and Teams adapters for consistent output. `formatToolResult()`, `formatKick()`, `formatError()`.
103
+ For a clean smoke test, run from outside the repo:
179
104
 
180
- **Skills** (`repertoire/skills.ts`): markdown files in `{your-dir}/skills/`. Listed with `list_skills`, loaded with `load_skill`. The loaded text is injected into conversation as a tool result.
181
-
182
- **Config** (`config.ts`): provider credentials, Teams connection info, OAuth config, Teams channel settings, and integrations are loaded from the `secrets.json` file pointed to by your `agent.json` `configPath`. Context window settings come from `agent.json` `context`. Runtime fails fast if the selected `agent.json.provider` is not fully configured in `secrets.json`; there is no silent provider fallback. No environment variables in `src/` -- everything comes from files.
183
-
184
- For Anthropic and OpenAI Codex auth bootstrap, use:
185
-
186
- - `npm run auth:claude-setup-token` to run `claude setup-token` and save `providers.anthropic.setupToken`.
187
- - `npm run auth:openai-codex` to run Codex OAuth bootstrap and save `providers.openai-codex.oauthAccessToken`.
105
+ ```bash
106
+ cd ~
107
+ npx ouro.bot -v
108
+ npx ouro.bot up
109
+ ouro -v
110
+ ouro status
111
+ ```
188
112
 
189
- ### What you can modify
113
+ Expected shape:
190
114
 
191
- Your `{agent}/` directory is yours. You can edit psyche files, add skills, change phrases, update your manifest. The shared harness (`src/`) is common infrastructure -- changes there affect all agents.
115
+ - `npx ouro.bot` and `ouro` report the same version.
116
+ - `ouro status` shows the daemon overview plus discovered agents, senses, and workers.
192
117
 
193
- See [CONTRIBUTING.md](CONTRIBUTING.md) for repo workflow conventions (branching, commits, testing, task docs).
118
+ ### Work On The Harness
194
119
 
195
- ## Running
120
+ From the repo:
196
121
 
197
122
  ```bash
198
- # CLI (ouroboros agent)
199
- npm run dev
200
-
201
- # CLI (slugger agent, once slugger/ directory exists)
202
- npm run dev:slugger
123
+ npm test
124
+ npx tsc --noEmit
125
+ npm run test:coverage
126
+ ```
203
127
 
204
- # Auth bootstrap (ouroboros defaults)
205
- npm run auth:claude-setup-token
206
- npm run auth:openai-codex
128
+ If you are changing runtime code, keep all three green.
207
129
 
208
- # Auth bootstrap for another agent
209
- npm run auth:claude-setup-token -- --agent slugger
210
- npm run auth:openai-codex -- --agent slugger
130
+ ## Common Commands
211
131
 
212
- # Teams bot
213
- npm run teams
132
+ ```bash
133
+ ouro up
134
+ ouro status
135
+ ouro logs
136
+ ouro stop
137
+ ouro hatch
138
+ ouro chat <agent>
139
+ ouro msg --to <agent> [--session <id>] [--task <ref>] <message>
140
+ ouro poke <agent> --task <task-id>
141
+ ouro link <agent> --friend <id> --provider <provider> --external-id <external-id>
142
+ ```
214
143
 
215
- # Teams bot without streaming (for devtunnel)
216
- npm run teams:no-stream
144
+ ## Where To Read Next
217
145
 
218
- # Tests
219
- npm test
146
+ - `AGENTS.md`
147
+ Repo workflow, planning/doing gates, configuration policy, and logging policy.
148
+ - `CONTRIBUTING.md`
149
+ Day-to-day contribution rules for agents working in the harness.
150
+ - `ARCHITECTURE.md`
151
+ Current daemon, bundle, sense, and update model.
152
+ - `docs/testing-guide.md`
153
+ Operator smoke flow for bootstrap, daemon, hatch, chat, and messaging.
220
154
 
221
- # Tests with coverage
222
- npm run test:coverage
223
- ```
155
+ ## A Note To Future Maintainers
224
156
 
225
- All commands pass `--agent <name>` to the entry points. Missing `--agent` produces a clear error and exits.
157
+ If you discover a doc that lies, fix it or remove it. Accuracy is a kindness. A future agent should not have to untangle a fossil record just to understand where their hands are.
package/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.37",
6
+ "changes": [
7
+ "The in-repo docs now match the current harness instead of the old repo-local bundle era. README, CONTRIBUTING, ARCHITECTURE, testing guidance, merge guidance, versioning guidance, and subagent docs now describe external bundles, current senses, daemon bootstrap, and bundle-owned task docs truthfully."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.36",
6
12
  "changes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.36",
3
+ "version": "0.1.0-alpha.37",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",
@@ -1,73 +1,60 @@
1
- # Sub-agents
1
+ # Workflow Helpers
2
2
 
3
- These are source-of-truth workflow definitions (`work-planner`, `work-doer`, `work-merger`) for planning, execution, and merge. They can be consumed either as Claude sub-agents (`.md` files with YAML frontmatter) or as Codex-style skills (`SKILL.md`).
3
+ These files are the source-of-truth workflow helpers for:
4
4
 
5
- ## Installation
5
+ - `work-planner`
6
+ - `work-doer`
7
+ - `work-merger`
6
8
 
7
- ### Claude Code (sub-agents)
9
+ They are written to stay generic enough for different agent shells, while following this repo’s local rules through `AGENTS.md`.
8
10
 
9
- Copy or symlink these files into Claude's sub-agent directory:
11
+ ## What They Do
12
+
13
+ - `work-planner.md`
14
+ Creates and refines planning docs, then converts approved plans into doing docs.
15
+ - `work-doer.md`
16
+ Executes approved doing docs unit by unit with strict validation discipline.
17
+ - `work-merger.md`
18
+ Syncs with `main`, resolves conflicts, creates the PR, handles CI, and merges.
19
+
20
+ ## Important Repo-Specific Truth
21
+
22
+ These helpers do not hardcode task-doc paths. They are expected to read project instructions to discover them.
23
+
24
+ In this repo, that means:
25
+
26
+ - task docs live in `~/AgentBundles/<agent>.ouro/tasks/one-shots/`
27
+ - not inside the repo
28
+
29
+ ## Installing For Claude Code
10
30
 
11
31
  ```bash
12
- # Claude Code
32
+ mkdir -p ~/.claude/agents
13
33
  cp subagents/*.md ~/.claude/agents/
14
- # or
15
- ln -s "$(pwd)"/subagents/*.md ~/.claude/agents/
16
34
  ```
17
35
 
18
- ### Codex / skill-based harnesses
19
-
20
- For tools that support skills but not Claude sub-agents, install these as skills:
36
+ ## Installing For Codex-Style Skills
21
37
 
22
38
  ```bash
23
39
  mkdir -p ~/.codex/skills/work-planner ~/.codex/skills/work-doer ~/.codex/skills/work-merger
24
-
25
- # Hard-link to keep one source of truth
26
- ln -f "$(pwd)/subagents/work-planner.md" ~/.codex/skills/work-planner/SKILL.md
27
- ln -f "$(pwd)/subagents/work-doer.md" ~/.codex/skills/work-doer/SKILL.md
28
- ln -f "$(pwd)/subagents/work-merger.md" ~/.codex/skills/work-merger/SKILL.md
40
+ cp subagents/work-planner.md ~/.codex/skills/work-planner/SKILL.md
41
+ cp subagents/work-doer.md ~/.codex/skills/work-doer/SKILL.md
42
+ cp subagents/work-merger.md ~/.codex/skills/work-merger/SKILL.md
29
43
  ```
30
44
 
31
- **Important:** Hard-links break when editors save by replacing the file (new inode). After editing any `subagents/*.md` file, re-run the `ln -f` command for that file to restore the link. You can verify with `stat -f '%i'` — both files should share the same inode.
32
-
33
- Optional UI metadata:
45
+ If you prefer symlinks or hard-links, that is fine too, but plain copies are easier to reason about and easier to repair when editors replace files.
34
46
 
35
- ```bash
36
- mkdir -p ~/.codex/skills/work-planner/agents ~/.codex/skills/work-doer/agents ~/.codex/skills/work-merger/agents
37
- cat > ~/.codex/skills/work-planner/agents/openai.yaml << 'EOF'
38
- interface:
39
- display_name: "Work Planner"
40
- short_description: "Create and gate planning/doing task docs"
41
- default_prompt: "Use $work-planner to create or update a planning doc, then stop at NEEDS_REVIEW."
42
- EOF
43
- cat > ~/.codex/skills/work-doer/agents/openai.yaml << 'EOF'
44
- interface:
45
- display_name: "Work Doer"
46
- short_description: "Execute approved doing docs with strict TDD"
47
- default_prompt: "Use $work-doer to execute an approved doing doc unit by unit."
48
- EOF
49
- cat > ~/.codex/skills/work-merger/agents/openai.yaml << 'EOF'
50
- interface:
51
- display_name: "Work Merger"
52
- short_description: "Merge feature branch into main via PR after work-doer completes"
53
- default_prompt: "Use $work-merger to merge the current feature branch into main."
54
- EOF
55
- ```
47
+ ## Keeping Local Skill Copies Fresh
56
48
 
57
- Restart the harness after install so new skills are discovered.
49
+ After editing any `subagents/*.md` file, resync your local installed copies.
58
50
 
59
- ## Available sub-agents
51
+ The repo workflow usually checks this with diffs like:
60
52
 
61
- | File | Purpose |
62
- |------|---------|
63
- | `work-planner.md` | Interactive task planner. Generates planning docs through conversation, then converts to doing docs after human approval. |
64
- | `work-doer.md` | Task executor. Reads a doing doc and works through each unit sequentially with strict TDD. |
65
- | `work-merger.md` | Sync-and-merge agent. Merges feature branch into main via PR after work-doer completes. Handles conflicts, CI failures, and race conditions. |
53
+ ```bash
54
+ diff -q ~/.codex/skills/work-planner/SKILL.md subagents/work-planner.md
55
+ diff -q ~/.codex/skills/work-doer/SKILL.md subagents/work-doer.md
56
+ ```
66
57
 
67
- ## Workflow
58
+ ## Restart Behavior
68
59
 
69
- 1. Human describes a task
70
- 2. Agent invokes **work-planner** to create a planning doc → human approves → planner converts to doing doc
71
- 3. Agent invokes **work-doer** to execute the doing doc unit by unit
72
- 4. Each unit is committed independently with progress tracked in the doing doc
73
- 5. Agent invokes **work-merger** to merge the feature branch into main via PR (fetch, merge, resolve conflicts, CI gate, merge PR, cleanup)
60
+ Some tools only discover new skills on startup. If a shell/app does not see updates immediately, restart that shell/app after syncing.