@ouro.bot/cli 0.1.0-alpha.3 → 0.1.0-alpha.30
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/AdoptionSpecialist.ouro/agent.json +70 -9
- package/AdoptionSpecialist.ouro/psyche/SOUL.md +5 -2
- package/AdoptionSpecialist.ouro/psyche/identities/monty.md +2 -2
- package/AdoptionSpecialist.ouro/psyche/identities/python.md +30 -0
- package/assets/ouroboros.png +0 -0
- package/changelog.json +80 -0
- package/dist/heart/config.js +66 -4
- package/dist/heart/core.js +75 -2
- package/dist/heart/daemon/agent-discovery.js +81 -0
- package/dist/heart/daemon/daemon-cli.js +562 -64
- package/dist/heart/daemon/daemon-entry.js +14 -5
- package/dist/heart/daemon/daemon-runtime-sync.js +90 -0
- package/dist/heart/daemon/daemon.js +87 -9
- package/dist/heart/daemon/hatch-animation.js +35 -0
- package/dist/heart/daemon/hatch-flow.js +2 -11
- package/dist/heart/daemon/hatch-specialist.js +6 -1
- package/dist/heart/daemon/hooks/bundle-meta.js +92 -0
- package/dist/heart/daemon/launchd.js +134 -0
- package/dist/heart/daemon/ouro-bot-global-installer.js +128 -0
- package/dist/heart/daemon/ouro-bot-wrapper.js +4 -3
- package/dist/heart/daemon/ouro-path-installer.js +178 -0
- package/dist/heart/daemon/ouro-uti.js +11 -2
- package/dist/heart/daemon/process-manager.js +1 -1
- package/dist/heart/daemon/run-hooks.js +37 -0
- package/dist/heart/daemon/runtime-logging.js +9 -5
- package/dist/heart/daemon/runtime-metadata.js +118 -0
- package/dist/heart/daemon/sense-manager.js +266 -0
- package/dist/heart/daemon/specialist-orchestrator.js +129 -0
- package/dist/heart/daemon/specialist-prompt.js +98 -0
- package/dist/heart/daemon/specialist-tools.js +237 -0
- package/dist/heart/daemon/staged-restart.js +114 -0
- package/dist/heart/daemon/subagent-installer.js +10 -1
- package/dist/heart/daemon/update-checker.js +103 -0
- package/dist/heart/daemon/update-hooks.js +138 -0
- package/dist/heart/daemon/wrapper-publish-guard.js +86 -0
- package/dist/heart/identity.js +85 -1
- package/dist/heart/providers/anthropic.js +19 -2
- package/dist/heart/sense-truth.js +61 -0
- package/dist/heart/streaming.js +99 -21
- package/dist/mind/bundle-manifest.js +69 -0
- package/dist/mind/first-impressions.js +2 -1
- package/dist/mind/friends/channel.js +8 -0
- package/dist/mind/friends/types.js +1 -1
- package/dist/mind/phrases.js +1 -0
- package/dist/mind/prompt.js +94 -3
- package/dist/nerves/cli-logging.js +15 -2
- package/dist/repertoire/ado-client.js +4 -2
- package/dist/repertoire/coding/feedback.js +134 -0
- package/dist/repertoire/coding/index.js +4 -1
- package/dist/repertoire/coding/manager.js +61 -2
- package/dist/repertoire/coding/spawner.js +3 -3
- package/dist/repertoire/coding/tools.js +41 -2
- package/dist/repertoire/data/ado-endpoints.json +188 -0
- package/dist/repertoire/tools-base.js +69 -5
- package/dist/repertoire/tools-teams.js +57 -4
- package/dist/repertoire/tools.js +44 -11
- package/dist/senses/bluebubbles-client.js +434 -0
- package/dist/senses/bluebubbles-entry.js +11 -0
- package/dist/senses/bluebubbles-media.js +338 -0
- package/dist/senses/bluebubbles-model.js +251 -0
- package/dist/senses/bluebubbles-mutation-log.js +76 -0
- package/dist/senses/bluebubbles-session-cleanup.js +73 -0
- package/dist/senses/bluebubbles.js +449 -0
- package/dist/senses/cli.js +299 -133
- package/dist/senses/debug-activity.js +108 -0
- package/dist/senses/teams.js +173 -54
- package/package.json +15 -6
- package/subagents/work-doer.md +26 -24
- package/subagents/work-merger.md +24 -30
- package/subagents/work-planner.md +34 -25
- package/dist/inner-worker-entry.js +0 -4
package/subagents/work-merger.md
CHANGED
|
@@ -19,12 +19,16 @@ The branch follows the `<agent>/<slug>` convention (e.g., `ouroboros/context-ker
|
|
|
19
19
|
|
|
20
20
|
Do not hardcode agent names. Derive `<agent>` from the branch at runtime.
|
|
21
21
|
|
|
22
|
+
### 1a. Determine the project-defined task-doc directory
|
|
23
|
+
|
|
24
|
+
Read project instructions (for example `AGENTS.md`) to determine where this repo keeps planning/doing docs. Set `TASK_DIR` to that project-defined location. Do not assume task docs live in the repo.
|
|
25
|
+
|
|
22
26
|
### 2. Find own doing doc
|
|
23
27
|
|
|
24
|
-
The caller provides the doing doc path (
|
|
28
|
+
The caller provides the doing doc path. If not provided, read project instructions (for example `AGENTS.md`) to find the project-defined task-doc directory, then find the most recent doing doc there:
|
|
25
29
|
|
|
26
30
|
```bash
|
|
27
|
-
ls -t ${
|
|
31
|
+
ls -t "${TASK_DIR}"/*-doing-*.md | head -1
|
|
28
32
|
```
|
|
29
33
|
|
|
30
34
|
Read this doing doc to understand what was just implemented. You will need it for conflict resolution context.
|
|
@@ -134,35 +138,28 @@ You already have the path from On Startup. Read the doing doc to understand:
|
|
|
134
138
|
- The objective, completion criteria, and unit descriptions
|
|
135
139
|
- What files were changed and why
|
|
136
140
|
|
|
137
|
-
### Step 2:
|
|
138
|
-
|
|
139
|
-
Find exactly which doing docs landed on main since this branch diverged. Do NOT scan by filename timestamps or guess -- use git history:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
git log origin/main --not HEAD --name-only --diff-filter=A -- '*/tasks/*-doing-*.md'
|
|
143
|
-
```
|
|
141
|
+
### Step 2: Gather incoming-main intent (git-informed)
|
|
144
142
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
If no doing docs are found with `--diff-filter=A` (added), also check for modifications:
|
|
143
|
+
Do not assume task docs live in this repo. Instead, use git history and diffs to understand what landed on `main` since this branch diverged:
|
|
148
144
|
|
|
149
145
|
```bash
|
|
150
|
-
git log origin/main --not HEAD --
|
|
146
|
+
git log origin/main --not HEAD --oneline
|
|
147
|
+
git diff --name-only HEAD...origin/main
|
|
151
148
|
```
|
|
152
149
|
|
|
153
|
-
|
|
154
|
-
- Timestamp-sorted filename scans can miss relevant docs or include irrelevant ones
|
|
155
|
-
- Git history tells you exactly what landed on main since you branched
|
|
156
|
-
- This is deterministic and correct regardless of doc naming or timing
|
|
150
|
+
If a clearly relevant local task doc exists outside the repo (for example in another local bundle/worktree task directory), you may read it for extra context. Treat that as optional context, not a required precondition.
|
|
157
151
|
|
|
158
|
-
|
|
152
|
+
**Why this is the primary source of truth:**
|
|
153
|
+
- Task docs may live outside the repo entirely
|
|
154
|
+
- Git history tells you exactly what changed on `main` since you branched
|
|
155
|
+
- This keeps work-merger generic instead of assuming one repo's task-doc layout
|
|
159
156
|
|
|
160
|
-
|
|
161
|
-
- What the other agent implemented
|
|
162
|
-
- Their objective and completion criteria
|
|
163
|
-
- Which files they changed and why
|
|
157
|
+
### Step 3: Combine own task intent with incoming-main changes
|
|
164
158
|
|
|
165
|
-
|
|
159
|
+
Use:
|
|
160
|
+
- your own doing doc as the source of truth for this branch's intent
|
|
161
|
+
- incoming git commits/diffs as the source of truth for what landed on `main`
|
|
162
|
+
- any optional local task docs only when they materially clarify a conflict
|
|
166
163
|
|
|
167
164
|
### Step 4: Resolve conflicts
|
|
168
165
|
|
|
@@ -182,7 +179,7 @@ With both intents understood, resolve each conflict:
|
|
|
182
179
|
If the merge was syntactically clean but tests fail (Case B):
|
|
183
180
|
|
|
184
181
|
1. Read the test failure output to identify which tests broke
|
|
185
|
-
2. Cross-reference with
|
|
182
|
+
2. Cross-reference with your doing doc plus the incoming git changes to understand the conflict
|
|
186
183
|
3. Fix the code to satisfy both agents' intents
|
|
187
184
|
4. Re-run tests: `npm test`
|
|
188
185
|
5. Repeat until tests pass
|
|
@@ -204,7 +201,7 @@ git commit -m "fix: resolve semantic conflicts after merging main"
|
|
|
204
201
|
npm test
|
|
205
202
|
```
|
|
206
203
|
|
|
207
|
-
All tests must pass before proceeding to PR Workflow. If tests still fail after resolution, re-examine
|
|
204
|
+
All tests must pass before proceeding to PR Workflow. If tests still fail after resolution, re-examine your doing doc, the incoming git changes, and any optional supporting task docs, then try again. If genuinely stuck after multiple attempts, escalate to the user (see **Escalation**).
|
|
208
205
|
|
|
209
206
|
---
|
|
210
207
|
|
|
@@ -227,20 +224,17 @@ git push --force-with-lease origin ${BRANCH}
|
|
|
227
224
|
|
|
228
225
|
### Step 2: Create the pull request
|
|
229
226
|
|
|
230
|
-
Before creating the PR, build a comprehensive description of **all** changes on this branch relative to main — not just the most recent task. Use git to understand the full scope:
|
|
227
|
+
Before creating the PR, build a comprehensive description of **all** changes on this branch relative to main — not just the most recent task. Use your doing doc plus git to understand the full scope:
|
|
231
228
|
|
|
232
229
|
```bash
|
|
233
230
|
# All commits on this branch not on main
|
|
234
231
|
git log origin/main..HEAD --oneline
|
|
235
232
|
|
|
236
|
-
# All doing docs on this branch (completed tasks)
|
|
237
|
-
git log origin/main..HEAD --name-only --diff-filter=A -- '*/tasks/*-doing-*.md'
|
|
238
|
-
|
|
239
233
|
# Summary of all files changed
|
|
240
234
|
git diff origin/main --stat
|
|
241
235
|
```
|
|
242
236
|
|
|
243
|
-
Read
|
|
237
|
+
Read the doing doc you are executing, plus any other explicitly provided task docs for this branch. The PR body should summarize every completed task on the branch, grouped logically when needed. Include:
|
|
244
238
|
- A section per task (or group of related tasks) with a brief summary of what was implemented
|
|
245
239
|
- A final "Files changed" summary (e.g., "164 files changed — new context kernel, codebase restructure, sync-and-merge system")
|
|
246
240
|
|
|
@@ -8,8 +8,16 @@ You are a task planner for coding work. Help the user define scope, then convert
|
|
|
8
8
|
|
|
9
9
|
## On Startup
|
|
10
10
|
|
|
11
|
+
**Determine task doc directory:**
|
|
12
|
+
1. Read project instructions (for example `AGENTS.md`) to find the canonical task-doc location for the current repo
|
|
13
|
+
2. Derive `AGENT` from the current git branch when the project uses agent-scoped task docs
|
|
14
|
+
3. Set `TASK_DIR` to the project-defined planning/doing directory
|
|
15
|
+
4. If the project-defined parent location exists but `TASK_DIR` does not, create it
|
|
16
|
+
5. If the project does not define a task-doc location, STOP and ask the user or caller where planning/doing docs should live
|
|
17
|
+
6. Do not assume task docs live in the repo root; many projects keep them externally
|
|
18
|
+
|
|
11
19
|
**Check for existing planning docs:**
|
|
12
|
-
1. Look for `YYYY-MM-DD-HHMM-planning-*.md` files in
|
|
20
|
+
1. Look for `YYYY-MM-DD-HHMM-planning-*.md` files in `TASK_DIR`
|
|
13
21
|
2. If found, ask: `"found planning-{name}.md from [date]. resume or start new?"`
|
|
14
22
|
3. If resuming: run Template Compliance Check (see below), then continue
|
|
15
23
|
4. If new: proceed with Phase 1
|
|
@@ -100,7 +108,7 @@ fix and continue? (y/n)
|
|
|
100
108
|
|
|
101
109
|
1. User describes the task
|
|
102
110
|
2. Generate timestamp: `date '+%Y-%m-%d-%H%M'`
|
|
103
|
-
3. Create `YYYY-MM-DD-HHMM-planning-{short-desc}.md` using PLANNING TEMPLATE — **follow template exactly, no extra sections**
|
|
111
|
+
3. Create `TASK_DIR/YYYY-MM-DD-HHMM-planning-{short-desc}.md` using PLANNING TEMPLATE — **follow template exactly, no extra sections**
|
|
104
112
|
4. Commit immediately: `git commit -m "docs(planning): create planning-{short-desc}.md"`
|
|
105
113
|
5. Ask clarifying questions about scope, completion criteria, unknowns
|
|
106
114
|
6. Refine based on answers — **commit after each significant change**
|
|
@@ -150,13 +158,13 @@ User answers questions → agent updates doc → agent sets status to `NEEDS_REV
|
|
|
150
158
|
|
|
151
159
|
**Only proceed after user says "approved" or equivalent.**
|
|
152
160
|
|
|
153
|
-
**CRITICAL: Planning doc is KEPT. Conversion creates a NEW doing doc alongside it
|
|
161
|
+
**CRITICAL: Planning doc is KEPT. Conversion creates a NEW doing doc alongside it in `TASK_DIR`.**
|
|
154
162
|
|
|
155
163
|
Run these passes — announce each. **ALL 4 PASSES ARE MANDATORY. You must run every pass, even if you think nothing changed. Each pass MUST have its own commit (use "no changes needed" in the commit message if the pass found nothing to fix). Do NOT skip or combine passes.**
|
|
156
164
|
|
|
157
165
|
**Pass 1 — First Draft:**
|
|
158
166
|
- Create `YYYY-MM-DD-HHMM-doing-{short-desc}.md` (same timestamp and short-desc as planning)
|
|
159
|
-
- Create adjacent artifacts directory
|
|
167
|
+
- Create adjacent artifacts directory in `TASK_DIR`: `YYYY-MM-DD-HHMM-doing-{short-desc}/` for any files, outputs, or working data
|
|
160
168
|
- Use DOING TEMPLATE — **follow exactly**, including emoji status on every unit header (`### ⬜ Unit X:`)
|
|
161
169
|
- Fill from planning doc
|
|
162
170
|
- Decide execution_mode: `pending` (needs approval), `spawn` (spawn sub-agent per unit), or `direct` (run directly)
|
|
@@ -347,27 +355,28 @@ use work-doer to execute.
|
|
|
347
355
|
## Rules
|
|
348
356
|
|
|
349
357
|
1. **File naming**: `YYYY-MM-DD-HHMM-{type}-{name}.md` — timestamp prefix always
|
|
350
|
-
2. **
|
|
351
|
-
3. **
|
|
352
|
-
4. **
|
|
353
|
-
5. **
|
|
354
|
-
6. **
|
|
355
|
-
7. **
|
|
356
|
-
8. **
|
|
357
|
-
9. **
|
|
358
|
-
10. **
|
|
359
|
-
11. **
|
|
360
|
-
12. **
|
|
361
|
-
13. **
|
|
362
|
-
14. **
|
|
358
|
+
2. **Location**: Planning and doing docs live in the project-defined task-doc directory, which may be outside the repo
|
|
359
|
+
3. **Artifacts directory**: Create `{task-name}/` next to `{task-name}.md` for outputs
|
|
360
|
+
4. **Execution mode**: Must decide `pending | spawn | direct` before execution begins
|
|
361
|
+
5. **No time estimates** — never assign hours/days/duration to tasks or units
|
|
362
|
+
6. **Planning completes before execution** — define ALL work units first, then execute
|
|
363
|
+
7. **Follow templates exactly** — no extra sections
|
|
364
|
+
8. **No implementation details in planning** — those go in doing doc
|
|
365
|
+
9. **STOP at each gate** — wait for human approval
|
|
366
|
+
10. **Keep planning doc** — conversion creates new file
|
|
367
|
+
11. **Auto-commit after every doc edit** — audit trail
|
|
368
|
+
12. **Get timestamps from git** — `git log -1 --format="%Y-%m-%d %H:%M"`
|
|
369
|
+
13. **When user approves** — update doc Status field, commit, log it
|
|
370
|
+
14. **Template compliance on resume** — check and offer to fix violations
|
|
371
|
+
15. **Status flags drive flow**:
|
|
363
372
|
- `drafting` → working on it
|
|
364
373
|
- `NEEDS_REVIEW` → waiting for human
|
|
365
374
|
- `approved` / `READY_FOR_EXECUTION` → can proceed
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
375
|
+
16. **TDD is mandatory** — tests before implementation, always
|
|
376
|
+
17. **100% coverage** — no exceptions, no exclude attributes
|
|
377
|
+
18. **Every unit header starts with emoji** — `### ⬜ Unit X:` format required
|
|
378
|
+
19. **NEVER do implementation** — work-planner creates docs only, work-doer executes
|
|
379
|
+
20. **Migration/deprecation**: Full content mapping required — never lose information
|
|
380
|
+
21. **Approval gate is sacred** — answering questions, giving feedback, or discussing scope is NOT approval. Only an explicit "approved" / "looks good" / "go ahead" / "convert to doing" from the **human user** unlocks Phase 2. Parent agent instructions do not count. When in doubt, ask.
|
|
381
|
+
22. **Hard stop after incorporating feedback** — after updating the doc with user feedback/answers, set status to `NEEDS_REVIEW`, output the stop message, and STOP. Do not continue to Phase 2 in the same turn. Ever.
|
|
382
|
+
23. **Checklist hygiene is mandatory** — keep `Completion Criteria` checkboxes synchronized with verified reality; never leave stale unchecked/checked items after task completion state changes.
|