@jaggerxtrm/specialists 3.17.0 → 3.18.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 +268 -134
- package/config/mandatory-rules/executor-delivery.md +4 -0
- package/config/mandatory-rules/json-only-final-output.md +13 -0
- package/config/mandatory-rules/service-skills-diff-scan-mandatory.md +26 -0
- package/config/mandatory-rules/service-skills-gitnexus-triage.md +5 -0
- package/config/mandatory-rules/test-runner-execution-scope.md +4 -0
- package/config/skills/setup-specialists/SKILL.md +556 -0
- package/config/skills/specialists-creator/SKILL.md +132 -4
- package/config/skills/specialists-creator/scripts/audit-spec-uniformity.mjs +1 -1
- package/config/skills/using-specialists-v3/SKILL.md +80 -20
- package/config/specialists/bare.specialist.json +3 -3
- package/config/specialists/changelog-drafter.specialist.json +5 -4
- package/config/specialists/changelog-keeper.specialist.json +7 -6
- package/config/specialists/debugger.specialist.json +2 -2
- package/config/specialists/executor.specialist.json +2 -2
- package/config/specialists/explorer.specialist.json +4 -4
- package/config/specialists/memory-processor.specialist.json +3 -3
- package/config/specialists/node-coordinator.specialist.json +3 -3
- package/config/specialists/obligations-scanner.specialist.json +67 -17
- package/config/specialists/overthinker.specialist.json +3 -3
- package/config/specialists/planner.specialist.json +4 -4
- package/config/specialists/quant-methodologist.specialist.json +145 -0
- package/config/specialists/quant-researcher.specialist.json +144 -0
- package/config/specialists/researcher.specialist.json +5 -5
- package/config/specialists/reviewer.specialist.json +1 -1
- package/config/specialists/seconder.specialist.json +2 -2
- package/config/specialists/security-auditor.specialist.json +2 -2
- package/config/specialists/service-skills-sync.specialist.json +90 -75
- package/config/specialists/specialists-creator.specialist.json +4 -4
- package/config/specialists/sync-docs.specialist.json +4 -4
- package/config/specialists/test-engineer.specialist.json +3 -3
- package/config/specialists/test-runner.specialist.json +7 -7
- package/config/specialists/transcriber.specialist.json +3 -3
- package/config/specialists/xt-merge.specialist.json +4 -4
- package/dist/asset-contract.json +22 -3
- package/dist/index.js +28711 -18517
- package/dist/lib.js +10020 -6150
- package/dist/types/cli/console/components.d.ts +83 -0
- package/dist/types/cli/console/components.d.ts.map +1 -0
- package/dist/types/cli/console/config-source.d.ts +58 -0
- package/dist/types/cli/console/config-source.d.ts.map +1 -0
- package/dist/types/cli/console/forensic.d.ts +11 -0
- package/dist/types/cli/console/forensic.d.ts.map +1 -0
- package/dist/types/cli/console/git.d.ts +28 -0
- package/dist/types/cli/console/git.d.ts.map +1 -0
- package/dist/types/cli/console/help.d.ts +2 -0
- package/dist/types/cli/console/help.d.ts.map +1 -0
- package/dist/types/cli/console/log.d.ts +13 -0
- package/dist/types/cli/console/log.d.ts.map +1 -0
- package/dist/types/cli/console/repo-config.d.ts +26 -0
- package/dist/types/cli/console/repo-config.d.ts.map +1 -0
- package/dist/types/cli/console/repo-discovery.d.ts +12 -0
- package/dist/types/cli/console/repo-discovery.d.ts.map +1 -0
- package/dist/types/cli/console/runtime.d.ts +12 -0
- package/dist/types/cli/console/runtime.d.ts.map +1 -0
- package/dist/types/cli/console/subscribe-prototype.d.ts +18 -0
- package/dist/types/cli/console/subscribe-prototype.d.ts.map +1 -0
- package/dist/types/cli/console/theme.d.ts +91 -0
- package/dist/types/cli/console/theme.d.ts.map +1 -0
- package/dist/types/cli/console/types.d.ts +231 -0
- package/dist/types/cli/console/types.d.ts.map +1 -0
- package/dist/types/cli/console/view-model.d.ts +252 -0
- package/dist/types/cli/console/view-model.d.ts.map +1 -0
- package/dist/types/cli/console.d.ts +2 -0
- package/dist/types/cli/console.d.ts.map +1 -0
- package/dist/types/cli/db.d.ts.map +1 -1
- package/dist/types/cli/doctor.d.ts.map +1 -1
- package/dist/types/cli/edit.d.ts.map +1 -1
- package/dist/types/cli/epic.d.ts.map +1 -1
- package/dist/types/cli/feed.d.ts.map +1 -1
- package/dist/types/cli/forensic.d.ts +2 -0
- package/dist/types/cli/forensic.d.ts.map +1 -0
- package/dist/types/cli/format-helpers.d.ts +4 -2
- package/dist/types/cli/format-helpers.d.ts.map +1 -1
- package/dist/types/cli/help.d.ts.map +1 -1
- package/dist/types/cli/init.d.ts +10 -0
- package/dist/types/cli/init.d.ts.map +1 -1
- package/dist/types/cli/list.d.ts.map +1 -1
- package/dist/types/cli/log.d.ts.map +1 -1
- package/dist/types/cli/merge.d.ts.map +1 -1
- package/dist/types/cli/metrics.d.ts +2 -0
- package/dist/types/cli/metrics.d.ts.map +1 -0
- package/dist/types/cli/ps.d.ts.map +1 -1
- package/dist/types/cli/result.d.ts.map +1 -1
- package/dist/types/cli/run.d.ts +20 -0
- package/dist/types/cli/run.d.ts.map +1 -1
- package/dist/types/cli/script.d.ts +3 -0
- package/dist/types/cli/script.d.ts.map +1 -1
- package/dist/types/cli/serve.d.ts.map +1 -1
- package/dist/types/cli/setup.d.ts +19 -1
- package/dist/types/cli/setup.d.ts.map +1 -1
- package/dist/types/cli/status.d.ts.map +1 -1
- package/dist/types/cli/version-check.d.ts +1 -0
- package/dist/types/cli/version-check.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/pi/session.d.ts +12 -1
- package/dist/types/pi/session.d.ts.map +1 -1
- package/dist/types/server.d.ts +15 -0
- package/dist/types/server.d.ts.map +1 -1
- package/dist/types/specialist/benchmarks.d.ts +37 -0
- package/dist/types/specialist/benchmarks.d.ts.map +1 -0
- package/dist/types/specialist/chain-identity.d.ts +7 -1
- package/dist/types/specialist/chain-identity.d.ts.map +1 -1
- package/dist/types/specialist/control.d.ts.map +1 -1
- package/dist/types/specialist/dead-job-audit.d.ts +20 -0
- package/dist/types/specialist/dead-job-audit.d.ts.map +1 -0
- package/dist/types/specialist/forensic-events.d.ts +138 -0
- package/dist/types/specialist/forensic-events.d.ts.map +1 -0
- package/dist/types/specialist/forensic-renderer.d.ts +34 -0
- package/dist/types/specialist/forensic-renderer.d.ts.map +1 -0
- package/dist/types/specialist/git-diff-evidence.d.ts +28 -0
- package/dist/types/specialist/git-diff-evidence.d.ts.map +1 -0
- package/dist/types/specialist/global-config.d.ts +389 -0
- package/dist/types/specialist/global-config.d.ts.map +1 -0
- package/dist/types/specialist/launch.d.ts +9 -0
- package/dist/types/specialist/launch.d.ts.map +1 -1
- package/dist/types/specialist/live-aggregates.d.ts +46 -0
- package/dist/types/specialist/live-aggregates.d.ts.map +1 -0
- package/dist/types/specialist/loader.d.ts +50 -1
- package/dist/types/specialist/loader.d.ts.map +1 -1
- package/dist/types/specialist/model-chain.d.ts +7 -0
- package/dist/types/specialist/model-chain.d.ts.map +1 -0
- package/dist/types/specialist/model-probes.d.ts +28 -0
- package/dist/types/specialist/model-probes.d.ts.map +1 -0
- package/dist/types/specialist/node-contract.d.ts +18 -18
- package/dist/types/specialist/node-supervisor.d.ts.map +1 -1
- package/dist/types/specialist/observability-db.d.ts +1 -1
- package/dist/types/specialist/observability-db.d.ts.map +1 -1
- package/dist/types/specialist/observability-sqlite.d.ts +101 -0
- package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
- package/dist/types/specialist/pr-drift-refresh.d.ts +17 -0
- package/dist/types/specialist/pr-drift-refresh.d.ts.map +1 -0
- package/dist/types/specialist/preset-resolver.d.ts +56 -0
- package/dist/types/specialist/preset-resolver.d.ts.map +1 -0
- package/dist/types/specialist/prometheus-projection.d.ts +25 -0
- package/dist/types/specialist/prometheus-projection.d.ts.map +1 -0
- package/dist/types/specialist/runner.d.ts +29 -1
- package/dist/types/specialist/runner.d.ts.map +1 -1
- package/dist/types/specialist/schema.d.ts +163 -54
- package/dist/types/specialist/schema.d.ts.map +1 -1
- package/dist/types/specialist/script-runner.d.ts +5 -1
- package/dist/types/specialist/script-runner.d.ts.map +1 -1
- package/dist/types/specialist/snapshot-diff.d.ts +8 -0
- package/dist/types/specialist/snapshot-diff.d.ts.map +1 -0
- package/dist/types/specialist/source-queue.d.ts +13 -0
- package/dist/types/specialist/source-queue.d.ts.map +1 -0
- package/dist/types/specialist/status-load.d.ts.map +1 -1
- package/dist/types/specialist/supervisor.d.ts +25 -1
- package/dist/types/specialist/supervisor.d.ts.map +1 -1
- package/dist/types/specialist/timeline-events.d.ts +70 -1
- package/dist/types/specialist/timeline-events.d.ts.map +1 -1
- package/dist/types/tools/specialist/resume_specialist.tool.d.ts +4 -4
- package/dist/types/tools/specialist/specialist_status.tool.d.ts +1 -1
- package/dist/types/tools/specialist/steer_specialist.tool.d.ts +4 -4
- package/dist/types/tools/specialist/use_specialist.tool.d.ts +16 -16
- package/docs/ARCHITECTURE.md +1176 -0
- package/docs/TODO.md +9 -0
- package/docs/architecture.md +11 -0
- package/docs/archive/2026-03-13-bd-decision-context-template-plan.md +96 -0
- package/docs/archive/AGENT-HANDOFF.md +351 -0
- package/docs/archive/PARITY-ANALYSIS.md +296 -0
- package/docs/archive/SPECIALISTS_REFACTOR.md.md +30 -0
- package/docs/archive/cc-programmatic.md +216 -0
- package/docs/archive/claude-agent-sdk.md +594 -0
- package/docs/archive/decision-specialist-directory.md +41 -0
- package/docs/archive/discoveries.md +148 -0
- package/docs/archive/executor-benchmark-protocol.md +198 -0
- package/docs/archive/future-features.md +66 -0
- package/docs/archive/gzrx-completion-critique.md +183 -0
- package/docs/archive/gzrx-research-notes.md +401 -0
- package/docs/archive/gzrx-tool-catalog.md +760 -0
- package/docs/archive/iron-review-hardening-qa-chain-substrate.md +322 -0
- package/docs/archive/iron-review-hardening.html +1004 -0
- package/docs/archive/issuetracking.md +312 -0
- package/docs/archive/qa-v3.0.2.md +220 -0
- package/docs/archive/restructure.md +231 -0
- package/docs/archive/script-specialists.md +1254 -0
- package/docs/archive/spec-v3.md +792 -0
- package/docs/archive/specialist-stats.md +127 -0
- package/docs/archive/specialists-friction-audit.md +1347 -0
- package/docs/archive/specialists-runtime-critique.md +170 -0
- package/docs/archive/specialists-service-evaluation.md +713 -0
- package/docs/archive/specialists-substrate-alignment.md +255 -0
- package/docs/archive/substrate-review.md +1288 -0
- package/docs/archive/test-writer-specialist.md +254 -0
- package/docs/archive/using-specialists-v3-improvements-2026-05-09.md +600 -0
- package/docs/archive/xtrm-specialists-analysis.md +314 -0
- package/docs/authoring.md +701 -0
- package/docs/background-jobs.md +203 -0
- package/docs/bare-specialists.md +83 -0
- package/docs/benchmarks/executor-benchmark-runner.md +66 -0
- package/docs/bootstrap.md +161 -0
- package/docs/cli-reference.md +1645 -0
- package/docs/deploying-alongside.md +155 -0
- package/docs/design/README.md +36 -0
- package/docs/design/darth-feedor-migration.md +290 -0
- package/docs/design/roadmap/README.md +32 -0
- package/docs/design/roadmap/chain-templates/README.md +146 -0
- package/docs/design/roadmap/chain-templates/code-quick.formula.json +27 -0
- package/docs/design/roadmap/chain-templates/code-standard.formula.json +126 -0
- package/docs/design/roadmap/chain-templates/code-with-advisors.formula.json +128 -0
- package/docs/design/roadmap/chain-templates/code-with-tests.formula.json +76 -0
- package/docs/design/roadmap/chain-templates/debug.formula.json +128 -0
- package/docs/design/roadmap/chain-templates/doc-sync.formula.json +28 -0
- package/docs/design/roadmap/chain-templates/memory-hygiene.formula.json +27 -0
- package/docs/design/roadmap/chain-templates/planning.formula.json +27 -0
- package/docs/design/roadmap/chain-templates/premortem.formula.json +26 -0
- package/docs/design/roadmap/chain-templates/release-prep.formula.json +36 -0
- package/docs/design/roadmap/chain-templates/research-only.formula.json +28 -0
- package/docs/design/roadmap/chain-templates/restitch.formula.json +125 -0
- package/docs/design/roadmap/chain-templates/security-deep.formula.json +161 -0
- package/docs/design/roadmap/chain-templates/test-only.formula.json +52 -0
- package/docs/design/roadmap/chain-templates/triage.formula.json +35 -0
- package/docs/design/roadmap/history/handoff-from-substrate-design.md +87 -0
- package/docs/design/roadmap/history/substrate-reconciliation.md +105 -0
- package/docs/design/roadmap/specialists-roadmap.md +1261 -0
- package/docs/design/sp-console-subscribe-via-materializer.md +231 -0
- package/docs/design/sp-console-tui-mock-v2.html +293 -0
- package/docs/design/sp-console-tui-mock.html +120 -0
- package/docs/design/sp-console-tui.md +340 -0
- package/docs/design/specialist-agentops-suite.md +323 -0
- package/docs/design/substrate/channels.md +14 -0
- package/docs/design/substrate/devops-platform-engineering-prd.md +446 -0
- package/docs/design/substrate/html-design-example.md +339 -0
- package/docs/design/xtrm-tiers-architecture.svg +132 -0
- package/docs/devops/dependency-verdict-materialization.md +46 -0
- package/docs/epic-readiness.md +75 -0
- package/docs/examples/mercury-atomic-summarizer.specialist.json +26 -0
- package/docs/examples/smoke-echo-text-expected-keys.specialist.json +25 -0
- package/docs/examples/smoke-echo.specialist.json +25 -0
- package/docs/features.md +1577 -0
- package/docs/hooks.md +81 -0
- package/docs/installation.md +142 -0
- package/docs/manifest.md +184 -0
- package/docs/mcp-servers.md +73 -0
- package/docs/mcp-tools.md +71 -0
- package/docs/nodes.md +231 -0
- package/docs/observability-metrics.md +152 -0
- package/docs/operator/sp-console-v2-walkthrough.md +410 -0
- package/docs/overrides-guide.md +306 -0
- package/docs/pi-rpc-boundary.md +118 -0
- package/docs/pi-session.md +195 -0
- package/docs/release.md +22 -0
- package/docs/skills.md +132 -0
- package/docs/specialists/handoff-schema.md +181 -0
- package/docs/specialists-catalog.md +99 -0
- package/docs/specialists-service-install.md +226 -0
- package/docs/specialists-service.md +363 -0
- package/docs/surface-ownership.md +138 -0
- package/docs/upgrade-notes/kan-90-global-user-config.md +114 -0
- package/docs/upgrade-notes/kan-91-expanded-overrides.md +261 -0
- package/docs/workflow.md +114 -0
- package/docs/worktree.md +71 -0
- package/docs/worktrees.md +309 -0
- package/package.json +7 -4
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# Specialist AgentOps Suite — Evaluation, Improvement & Optimization
|
|
2
|
+
|
|
3
|
+
> Status: foundational design draft (2026-06-05).
|
|
4
|
+
> Purpose: define the **Evaluation** and **Optimization** pillars of an AgentCore-like
|
|
5
|
+
> management suite for specialists, on top of the telemetry/forensics foundation already
|
|
6
|
+
> shipped. Intended as a base to build on, not a one-off pilot spec.
|
|
7
|
+
> Supersedes the narrow framing of bead `unitAI-my1li` (post-v4 SkillOpt pilot) — see §11.
|
|
8
|
+
> Sources: `docs/design/post-aws-summit-research-findings.md` §3 (SkillOpt) + §5 (AgentCore
|
|
9
|
+
> Evaluation), `config/specialists/*.specialist.json`, `github.com/microsoft/SkillOpt`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 0. Why now (the defer was half-wrong)
|
|
14
|
+
|
|
15
|
+
The prior call (`unitAI-my1li`, §3 of the research doc) deferred this to "post-v4" on two
|
|
16
|
+
fears: **(a)** overfitting to transient traces, **(b)** no real A/B harness, plus an
|
|
17
|
+
implicit assumption of **low data volume**. Three facts overturn the part that matters:
|
|
18
|
+
|
|
19
|
+
1. **Volume is high.** A specialist runs **hundreds of times per week — sometimes per day —
|
|
20
|
+
across all repos.** This is not a quarterly-anecdote regime; it is enough for genuine
|
|
21
|
+
batched evaluation with held-out splits and statistical power. Volume is now the
|
|
22
|
+
*justification* for a managed suite (ad-hoc prompt tweaking does not scale at this rate),
|
|
23
|
+
not just an enabler.
|
|
24
|
+
2. **Forensics/telemetry already ship.** `observability.db`, `sp log`/`sp feed`, the
|
|
25
|
+
channels/wakes/memory tables, and the `using-kpi` analysis layer already capture per-run
|
|
26
|
+
runtime, tokens, tool-calls, waiting, and outcomes. The scored-trajectory substrate
|
|
27
|
+
SkillOpt requires mostly **exists**.
|
|
28
|
+
3. **The reward function already runs.** The canonical QA+Iron pipeline (seconder dual
|
|
29
|
+
verdict → test-engineer/test-runner pass/fail → obligations-scanner → reviewer
|
|
30
|
+
PASS/PARTIAL/FAIL + Release Checklist) is a per-run scorer over a chain. A chain run *is*
|
|
31
|
+
a rollout; the gate verdicts *are* the reward.
|
|
32
|
+
|
|
33
|
+
What was correctly deferred: **live autonomous self-editing** (SkillOpt's `update` stage
|
|
34
|
+
committing a winning candidate unsupervised). That stays deferred — `config/specialists` is
|
|
35
|
+
a sensitive surface and a specialist rewriting its own prompt is the agentops equivalent of
|
|
36
|
+
a model editing its own loss function. What should **not** wait: capturing proposals,
|
|
37
|
+
tracking maturity, and standing up the evaluation pillar. Deferring *capture* has an ongoing
|
|
38
|
+
cost — every run that finishes without recording its self-assessment is signal lost forever.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 1. Framing: an AgentCore-like suite for specialists
|
|
43
|
+
|
|
44
|
+
AWS Bedrock AgentCore (research §5) is a set of platform pillars: Runtime, Memory, Gateway,
|
|
45
|
+
Identity, Observability, Policy, **Evaluations**, **Optimization**, … xtrm already has most
|
|
46
|
+
of the analogues; the two it lacks as first-class capabilities are exactly the two this doc
|
|
47
|
+
defines.
|
|
48
|
+
|
|
49
|
+
| AgentCore pillar | xtrm analogue | State |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| Runtime | `sp` job lifecycle, runner, worktrees | shipped |
|
|
52
|
+
| Memory | substrate memory (§10) | designed |
|
|
53
|
+
| Observability | `observability.db`, `sp log`/`feed`, `using-kpi`, forensics | **shipped** |
|
|
54
|
+
| Policy | permission tiers (LOW/MEDIUM/HIGH) + SCRUTINY + hooks | shipped |
|
|
55
|
+
| Identity / authority | participant authority model (channels §10.1) | designed |
|
|
56
|
+
| Gateway / MCP | 7-tool MCP layer, `use_specialist` | shipped |
|
|
57
|
+
| **Evaluations** | **this doc — §8 harness** | **gap** |
|
|
58
|
+
| **Optimization** | **this doc — §4–7 loop + governance** | **gap** |
|
|
59
|
+
|
|
60
|
+
This document is therefore the base layer for "specialist management as a product": it turns
|
|
61
|
+
the forensic data into an evaluation pillar and the evaluation pillar into a *governed*
|
|
62
|
+
optimization pillar. The console (§9) is its UI.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 2. Configs are skills
|
|
67
|
+
|
|
68
|
+
A `.specialist.json` is a skill in SkillOpt's exact sense — a text instruction doc fed
|
|
69
|
+
in-context to a frozen model. The optimizable surface, from `executor.specialist.json`:
|
|
70
|
+
|
|
71
|
+
- **`prompt.system`** — the large instruction body (principles, naming, error handling,
|
|
72
|
+
anti-patterns table, self-review checklist, obligations discipline). This *is* SkillOpt's
|
|
73
|
+
`SKILL.md` body.
|
|
74
|
+
- **`mandatory_rules.template_sets`** — shared, reusable rule packs (`code-quality-defaults`,
|
|
75
|
+
`executor-delivery`, `per-turn-handoff-schema`, …) composed into many specialists.
|
|
76
|
+
- **`prompt.task_template`**, `prompt.system_prompt_mode` (`append`/replace).
|
|
77
|
+
|
|
78
|
+
**Optimization granularity is a real choice.** Optimizing a per-specialist `prompt.system`
|
|
79
|
+
is isolated and safe to A/B. Optimizing a *shared* `template_set` (e.g.
|
|
80
|
+
`code-quality-defaults`) improves every consumer at once — higher leverage, but a regression
|
|
81
|
+
hits all of them, so shared packs require multi-specialist A/B before apply. The unit of
|
|
82
|
+
optimization must be declared per proposal.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 3. The signal: scored trajectories from the pipeline
|
|
87
|
+
|
|
88
|
+
SkillOpt assumes labeled task sets with exact-match ground truth. xtrm work is open-ended, so
|
|
89
|
+
the reward is **composite and already produced**:
|
|
90
|
+
|
|
91
|
+
- **Outcome reward (from gates):** seconder `scope/quality/overall_verdict`, test-runner
|
|
92
|
+
pass/fail + failure-owner classification, obligations clean, reviewer
|
|
93
|
+
PASS/PARTIAL/FAIL, Release Checklist.
|
|
94
|
+
- **Efficiency reward (from KPI/forensics):** tokens, turns, waiting time, tool-call count,
|
|
95
|
+
retries, fix-loops triggered (`using-kpi`, `observability.db`).
|
|
96
|
+
|
|
97
|
+
A trajectory = one chain run = `{bead contract (task), specialist config version (skill),
|
|
98
|
+
transcript + result (output), gate verdicts + KPI (reward)}`.
|
|
99
|
+
|
|
100
|
+
**Volume caveats (honest):** these trajectories are **not i.i.d.** — different repos, beads,
|
|
101
|
+
task types — and the reward (a gate verdict) is itself a **noisy LLM judge**. So:
|
|
102
|
+
- **Stratify** per-specialist, optionally per-task-type/per-repo; do not pool blindly.
|
|
103
|
+
- High volume *helps* average out judge noise but does not eliminate label bias.
|
|
104
|
+
- Treat the reward as composite (outcome × efficiency), not a single scalar, so a prompt that
|
|
105
|
+
passes review by burning 3× tokens does not read as "better."
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 4. The SkillOpt loop, adapted
|
|
110
|
+
|
|
111
|
+
| SkillOpt stage | xtrm adaptation |
|
|
112
|
+
|---|---|
|
|
113
|
+
| **rollout** | Real chain runs (no synthetic benchmark). Scored by the pipeline (§3). Volume is organic — hundreds/week — stratified per specialist. |
|
|
114
|
+
| **reflect** | Two sources (§5): an offline **evaluator** specialist over many trajectories, *and* **self-proposals** from the specialist at end-of-run. Output is a candidate patch (add/delete/replace), bounded in size. |
|
|
115
|
+
| **aggregate** | Cluster proposals + recurring failure patterns per specialist into a single candidate patch dict. |
|
|
116
|
+
| **select** | Synthesize `candidate config` (a prompt variant), versioned, never written to the live registry. |
|
|
117
|
+
| **update** | **Replaced by a governed apply (§5).** Never autonomous. The "rejected-edit buffer" becomes closed/declined proposal beads — themselves forensic signal. |
|
|
118
|
+
| **evaluate_gate** | Golden-set A/B (§8): run candidate vs current on a frozen held-out bead set, score with the same pipeline, accept **iff** composite reward improves with no gate regression. Human-approved. |
|
|
119
|
+
|
|
120
|
+
The "train like a neural net" framing (epochs, minibatch, textual learning rate, validation
|
|
121
|
+
gate) maps to: batched stratified rollouts, bounded patch size as the learning rate, and the
|
|
122
|
+
golden-set gate as held-out loss. The one piece that **does not** carry over is auto-commit.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 5. Governance invariant: propose → escalate → review → gated apply
|
|
127
|
+
|
|
128
|
+
**Hard invariant: no specialist may edit any `.specialist.json`, least of all its own.**
|
|
129
|
+
Optimization always terminates in a *proposal*, never a write.
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
rollout (scored runs)
|
|
133
|
+
→ reflect (evaluator OR self-proposal)
|
|
134
|
+
→ proposal artifact (standardized bead, §6)
|
|
135
|
+
→ escalation + human/review gate
|
|
136
|
+
→ specialists-creator applies the approved patch [SCRUTINY: config surface]
|
|
137
|
+
→ golden-set A/B validates before/after (§8)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Two proposer roles (the dual-source model):
|
|
141
|
+
|
|
142
|
+
1. **Evaluator-driven (top-down, offline, statistical).** A READ_ONLY `prompt-optimizer`
|
|
143
|
+
analyst reads `observability.db` + verdicts + KPI for one specialist, aggregates recurring
|
|
144
|
+
friction across many runs, files a candidate-patch proposal. This is also the correct home
|
|
145
|
+
for the AgentCore evaluator-vs-diagnostic split (§5 of research): an *evaluator* path that
|
|
146
|
+
scores, distinct from a *diagnostic* path that triages plumbing failures.
|
|
147
|
+
2. **Self-proposed (bottom-up, online, contextual).** A specialist, at end of a chain turn,
|
|
148
|
+
escalates a proposal about its *own* prompt when it hit a prompt-level problem (ambiguous
|
|
149
|
+
or contradictory instruction, a rule that forced a wasteful loop, missing guidance). This
|
|
150
|
+
is *beyond* SkillOpt (which is purely optimizer-driven) and is valuable precisely because
|
|
151
|
+
the specialist holds the live trajectory context the offline optimizer lacks.
|
|
152
|
+
|
|
153
|
+
Transport for self-proposals: the channels `proposal` kind (channels.md §5.3), extended with
|
|
154
|
+
a `skill-patch` shape; and/or the standardized bead in §6. Authority is safe because channels
|
|
155
|
+
§10.1 already rejects body-text authority — a proposal cannot smuggle itself into a write.
|
|
156
|
+
|
|
157
|
+
The apply step has a natural gated owner: **`specialists-creator`** (already authors/edits
|
|
158
|
+
`.specialist.json`), dispatched only on an approved proposal, through normal review plus the
|
|
159
|
+
config-surface SCRUTINY auto-escalation.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 6. The mandatory-rules proposal mechanism (capture = telemetry)
|
|
164
|
+
|
|
165
|
+
The elegant part: reuse the **`mandatory_rules.template_sets`** infrastructure that already
|
|
166
|
+
injects shared rule packs (`per-turn-handoff-schema`, `bead-id-verbatim`, …) into specialists.
|
|
167
|
+
|
|
168
|
+
Add a sibling pack — **`improvement-proposal-schema`** — included by every specialist. It
|
|
169
|
+
instructs: *when you detect prompt-level friction during a run, file a standardized, named
|
|
170
|
+
bead* (filing a bead is already allowed — it is exactly the existing `discovered-from`
|
|
171
|
+
follow-up pattern the executor prompt teaches; **applying** it is not):
|
|
172
|
+
|
|
173
|
+
- **Title convention (named/standard):** `sp-improve(<specialist>): <one-line>`
|
|
174
|
+
- **Type/tags:** `decision` (or a new `improvement` type), tag `prompt-optimization`
|
|
175
|
+
- **Links:** `discovered-from:<current-bead>`, scoped to the specialist's config file
|
|
176
|
+
- **Structured body:** trajectory ref (job/result id), the offending instruction verbatim,
|
|
177
|
+
the proposed patch (candidate text), evidence (what went wrong, KPI cost)
|
|
178
|
+
|
|
179
|
+
Because these beads are **named and standardized**, they become first-class telemetry:
|
|
180
|
+
|
|
181
|
+
- **Count** of open `sp-improve(<specialist>)` beads = pending improvement work per specialist.
|
|
182
|
+
- **Trigger:** when the count crosses a threshold (or on a schedule), the suite dispatches an
|
|
183
|
+
evaluation run for that specialist. The board *tells* you where work is.
|
|
184
|
+
- **Forensic trace:** every proposal links back to the run that produced it, so you can see
|
|
185
|
+
which prompt rules generate the most friction across the fleet.
|
|
186
|
+
|
|
187
|
+
This is the answer to "how do we know if there's any work to evaluate": **the standardized
|
|
188
|
+
proposal bead IS the captured signal.** The mandatory rule enforces *capture*; the permission
|
|
189
|
+
model + the §5 invariant enforce *non-application*.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 7. Optimization maturity as first-class metadata
|
|
194
|
+
|
|
195
|
+
The product insight: **shipped default specialists are continuously optimized; a user who
|
|
196
|
+
runs `sp create` gets a primitive, unoptimized specialist that needs work.** Make that state
|
|
197
|
+
detectable and trackable as a metadata field on the config (the schema already carries
|
|
198
|
+
`metadata.{name,version,category,updated,tags}` — room to extend):
|
|
199
|
+
|
|
200
|
+
```jsonc
|
|
201
|
+
"metadata": {
|
|
202
|
+
"name": "executor",
|
|
203
|
+
// ...
|
|
204
|
+
"optimization": {
|
|
205
|
+
"status": "primitive | candidate | optimized | regressed",
|
|
206
|
+
"eval_score": 0.0, // last golden-set composite reward
|
|
207
|
+
"baseline_version": "1.0.0", // prompt version the score is against
|
|
208
|
+
"optimized_at": "2026-06-05T...",
|
|
209
|
+
"pending_proposals": 0, // open sp-improve(<name>) beads (from §6)
|
|
210
|
+
"golden_set_ref": "golden/executor.v1"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- **Shipped defaults** ship as `optimized` with a known `eval_score` and a frozen golden set.
|
|
216
|
+
- **`sp create` / `sp edit`** (user-tier) initializes new specialists as **`primitive`** —
|
|
217
|
+
visibly "born unoptimized, work to do."
|
|
218
|
+
- The field is **detectable** (lint/doctor can flag primitive specialists), **trackable**
|
|
219
|
+
(forensics trends `eval_score` over versions), and **drives the console** (§9).
|
|
220
|
+
- `regressed` is set when a later eval drops below baseline — a signal to re-open optimization.
|
|
221
|
+
|
|
222
|
+
This belongs on the specialist **configuration page** (the user's explicit ask): a specialist's
|
|
223
|
+
config view shows its maturity, its score history, and its pending proposals.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 8. The evaluation harness (the one real build)
|
|
228
|
+
|
|
229
|
+
The genuinely new engineering, and what §3 correctly flagged as missing. Since there is no
|
|
230
|
+
exact-match ground truth, the xtrm analogue of a held-out val split is a **frozen golden-bead
|
|
231
|
+
set per specialist**:
|
|
232
|
+
|
|
233
|
+
- **Golden set:** a curated, frozen snapshot of past beads with known-good outcomes (drawn
|
|
234
|
+
from the high-volume history — §0). Versioned, referenced from `metadata.optimization`.
|
|
235
|
+
- **A/B run:** execute the candidate-prompt variant and the current prompt against the golden
|
|
236
|
+
set (`sp run` with a prompt-override / candidate config), under a frozen registry snapshot.
|
|
237
|
+
- **Score:** the same pipeline gates + KPI deltas (§3), composite reward.
|
|
238
|
+
- **Gate (strict, SkillOpt-style, human-approved):** accept iff candidate beats current on the
|
|
239
|
+
golden set with **no gate regression** and no unacceptable efficiency cost.
|
|
240
|
+
- **Shadow mode first:** like the `node_memory` derivation plan in channels.md, run candidates
|
|
241
|
+
in shadow (score without applying) before any apply is offered.
|
|
242
|
+
|
|
243
|
+
At hundreds of runs/week, golden sets can be refreshed and stratified cheaply; the harness can
|
|
244
|
+
run **continuously in shadow**, with apply still strictly human-gated.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 9. The console as the suite UI
|
|
249
|
+
|
|
250
|
+
The console (the read-only dashboard, soon `packages/console`) is where the suite becomes
|
|
251
|
+
usable:
|
|
252
|
+
|
|
253
|
+
- **Fleet maturity view:** every specialist with its `optimization.status`, `eval_score`
|
|
254
|
+
trend, and `pending_proposals` count.
|
|
255
|
+
- **Proposal queue:** open `sp-improve(<specialist>)` beads, grouped by specialist, with the
|
|
256
|
+
trajectory evidence inline.
|
|
257
|
+
- **Run the suite:** trigger an evaluation/A-B run for a specialist from the UI; watch it
|
|
258
|
+
stream over `sp feed`/`sb feed`.
|
|
259
|
+
- **Before/after diffs:** candidate vs current prompt, with golden-set score deltas, presented
|
|
260
|
+
for the human apply decision.
|
|
261
|
+
|
|
262
|
+
This is the user-facing half of "we ship optimized defaults; you optimize your own."
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## 10. How it composes with the rest of xtrm
|
|
267
|
+
|
|
268
|
+
- **substrate** — proposals are issues/contracts; the apply goes through the Stage-1/Stage-2
|
|
269
|
+
validator and review like any change. Golden sets and eval runs are containers.
|
|
270
|
+
- **channels** — `proposal` kind carries self-proposals; authority model prevents body-text
|
|
271
|
+
escalation into a write.
|
|
272
|
+
- **specialists** — the gated apply owner is `specialists-creator`; the runner permission
|
|
273
|
+
model + the §5 invariant block self-edits.
|
|
274
|
+
- **observability / using-kpi** — the trajectory store and reward source.
|
|
275
|
+
- **AgentCore (research §5)** — evaluator-vs-diagnostic split lands as the two analyst paths
|
|
276
|
+
in §5; this suite is the xtrm realization of AgentCore's Evaluations + Optimization pillars.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 11. Sequencing + re-scope of `unitAI-my1li`
|
|
281
|
+
|
|
282
|
+
`unitAI-my1li` is currently scoped narrowly as a *post-v4 SkillOpt pilot* (P4, deferred). It
|
|
283
|
+
should be re-scoped as the **parent of the AgentOps suite**, split into:
|
|
284
|
+
|
|
285
|
+
**Now — groundwork (additive, reversible, no autonomous behavior):**
|
|
286
|
+
- `improvement-proposal-schema` mandatory-rules pack + standardized `sp-improve(<name>)` bead
|
|
287
|
+
convention (§6).
|
|
288
|
+
- `metadata.optimization` maturity field; `sp create`/`sp edit` initialize `primitive` (§7).
|
|
289
|
+
- Forensic tracking of proposal counts + per-rule friction (§6).
|
|
290
|
+
- This design page on the configuration docs.
|
|
291
|
+
|
|
292
|
+
**Post-v4 — the loop (gated, builds on groundwork):**
|
|
293
|
+
- `prompt-optimizer` evaluator specialist (§5.1).
|
|
294
|
+
- Golden-set A/B harness + shadow mode (§8).
|
|
295
|
+
- Gated apply via `specialists-creator` under SCRUTINY (§5).
|
|
296
|
+
- Console suite UI (§9).
|
|
297
|
+
|
|
298
|
+
**Invariant across both:** apply is always human-gated. Volume changes the *cadence* of
|
|
299
|
+
capture/evaluation (continuous, not quarterly), never the apply gate.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## 12. Open questions
|
|
304
|
+
|
|
305
|
+
- **Optimization unit** — per-specialist `prompt.system` vs shared `template_set`. Different
|
|
306
|
+
A/B blast radius; declare per proposal (§2).
|
|
307
|
+
- **Reward weighting** — outcome vs efficiency blend; how to prevent token-burning "wins" (§3).
|
|
308
|
+
- **Golden-set drift** — how often to refresh, and how to avoid leaking recent prod beads that
|
|
309
|
+
the prompt has effectively memorized (§8).
|
|
310
|
+
- **Self-proposal noise** — rate-limit / dedupe `sp-improve` beads so a flaky run does not spam
|
|
311
|
+
the queue; cluster before surfacing (§6).
|
|
312
|
+
- **New `improvement` bead type** vs reusing `decision` — schema decision.
|
|
313
|
+
- **Cross-repo aggregation** — proposals/forensics span all repos; where does the suite's
|
|
314
|
+
store live (ties to substrate single-store, §13 of the IT doc)?
|
|
315
|
+
|
|
316
|
+
## 13. Next actions
|
|
317
|
+
|
|
318
|
+
- [ ] Re-scope `unitAI-my1li` to point at this doc + split now/post-v4 (command below).
|
|
319
|
+
- [ ] Spec `improvement-proposal-schema` template set + `sp-improve(<name>)` convention.
|
|
320
|
+
- [ ] Add `metadata.optimization` to `src/specialist/schema.ts`; default `primitive` on create.
|
|
321
|
+
- [ ] Forensic query: open `sp-improve` beads per specialist + per-rule friction histogram.
|
|
322
|
+
- [ ] Design the golden-set format + the A/B run command (`sp run --candidate-config`).
|
|
323
|
+
- [ ] Console: fleet maturity view + proposal queue (post-`packages/console`).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Channels — STUB (moved to xtrm vault)
|
|
2
|
+
|
|
3
|
+
> **This file is no longer canonical.** It was a stale copy (2026-05-26, 617 lines) of the channels design.
|
|
4
|
+
>
|
|
5
|
+
> **Canonical home:** `~/dev/xtrm/docs/channels/channels.md` (864 lines, audited 2026-06-11, last revised 2026-06-21).
|
|
6
|
+
>
|
|
7
|
+
> Related companions in the vault:
|
|
8
|
+
> - `~/dev/xtrm/docs/channels/channels-forensic-attention-proposal.md`
|
|
9
|
+
> - `~/dev/xtrm/docs/channels/channels-upgrade.md`
|
|
10
|
+
> - `~/dev/xtrm/docs/channels/channels_plain_it.md`
|
|
11
|
+
>
|
|
12
|
+
> Background: MOC §7 #1 (resolved 2026-06-21). Vault is the single source of truth for cross-cutting design; only code lives in this repo.
|
|
13
|
+
>
|
|
14
|
+
> If you are an agent following a bead-mandatory-reading pointer that lands here, follow the link above.
|