role-os 2.8.0 → 2.9.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/CHANGELOG.md +55 -0
- package/README.es.md +35 -12
- package/README.fr.md +32 -9
- package/README.hi.md +32 -9
- package/README.it.md +36 -13
- package/README.ja.md +33 -10
- package/README.md +32 -9
- package/README.pt-BR.md +32 -9
- package/README.zh.md +32 -9
- package/bin/roleos.mjs +3 -2
- package/package.json +1 -1
- package/src/artifacts.mjs +14 -7
- package/src/audit-cmd.mjs +23 -23
- package/src/brainstorm-roles.mjs +6 -0
- package/src/citation-panel.mjs +26 -1
- package/src/composite.mjs +4 -0
- package/src/dispatch.mjs +3 -1
- package/src/dossier-block.mjs +74 -0
- package/src/entry.mjs +2 -2
- package/src/hooks.mjs +107 -27
- package/src/knowledge/analyze-artifact-evidence.mjs +19 -9
- package/src/knowledge/fallback-policy.mjs +19 -7
- package/src/knowledge/resolve-overlay.mjs +21 -8
- package/src/knowledge/retrieve-for-dispatch.mjs +9 -4
- package/src/mission-run.mjs +11 -2
- package/src/packs-cmd.mjs +1 -1
- package/src/review.mjs +11 -2
- package/src/role-dossiers.json +962 -0
- package/src/route.mjs +41 -8
- package/src/run-cmd.mjs +0 -1
- package/src/run.mjs +67 -15
- package/src/session.mjs +3 -1
- package/src/specialist/capability-gate.mjs +35 -18
- package/src/specialist/dispatch.mjs +8 -3
- package/src/specialist/registry.mjs +6 -0
- package/src/specialist/shadow.mjs +13 -3
- package/src/specialist/state.mjs +94 -26
- package/src/state-machine.mjs +2 -2
- package/src/status.mjs +4 -2
- package/src/swarm/build-gate.mjs +11 -2
- package/src/swarm/persist-bridge.mjs +4 -3
- package/src/swarm-cmd.mjs +88 -46
- package/src/verify-citations-cmd.mjs +17 -1
- package/src/verify-citations.mjs +31 -7
- package/starter-pack/README.md +22 -14
- package/starter-pack/handbook.md +4 -4
- package/starter-pack/policy/routing-rules.md +42 -0
- package/starter-pack/policy/tool-permissions.md +21 -0
- package/starter-pack/workflows/full-treatment.md +27 -16
package/README.md
CHANGED
|
@@ -96,9 +96,15 @@ Role OS verifies and gates tool calls at the `PreToolUse` seam — deterministic
|
|
|
96
96
|
- **Conformance watcher** (advisory, fail-open) — a deterministic schema + computable-contract floor checks a proposed call against its catalogued tool-contract and attaches an advisory verdict on a *proven* nonconformant call; it never blocks. An opt-in LLM ceiling (`ROLEOS_CONFORMANCE_CONSULT`) handles the genuinely-semantic residue.
|
|
97
97
|
- **Capability gate** (fail-closed, opt-in `ROLEOS_CAPABILITY_GATE`, default OFF) — deterministic least-privilege on *irreversible* actions (npm/PyPI publish, `gh release`, `git push`, repo edits, Pages deploy). A gated action is denied unless the director granted its capability in `.claude/role-os/capabilities.json`, so a wrong step — an honest mistake or an injected one — can't trigger an unauthorized irreversible action. The preventive complement to the named-compensator rule. See the [handbook](https://mcp-tool-shop-org.github.io/role-os/handbook/).
|
|
98
98
|
|
|
99
|
+
## Crew dossier
|
|
100
|
+
|
|
101
|
+
Every role has a **dossier** — a character sheet that doubles as run-time config. Six aptitudes (Rigor, Pace, Range, Skepticism, Autonomy, Candor) map to real dispatch knobs; an eight-archetype **disposition** layer (Skeptic, Builder, Investigator, Maverick…) carries a behavioral instruction; and each role has a painted portrait and a grade. Browse the whole crew as a gallery (`dossier/dossier.html`) — each role's radar shows its tuned build against its canonical ideal.
|
|
102
|
+
|
|
103
|
+
When a role has a dossier, dispatch injects an **Operating Posture** — the disposition's behavioral instruction plus a posture line from the role's aptitudes — so the sheet actually configures the role. Opt-in and additive: roles without a dossier behave exactly as before. See the [handbook](https://mcp-tool-shop-org.github.io/role-os/handbook/crew-dossier/).
|
|
104
|
+
|
|
99
105
|
## Org rollout state
|
|
100
106
|
|
|
101
|
-
Org-wide rollout state (queue, decisions, audit records, per-repo lock packets) lives in a separate private repo
|
|
107
|
+
Org-wide rollout state (queue, decisions, audit records, per-repo lock packets) lives in a separate **private**, org-internal repo (`role-os-rollout`). This repo is the product; that repo is operational state.
|
|
102
108
|
|
|
103
109
|
## Memory and continuity
|
|
104
110
|
|
|
@@ -114,18 +120,21 @@ Full treatment is a canonical 7-phase protocol defined in Claude project memory
|
|
|
114
120
|
|
|
115
121
|
Order: Shipcheck first, then full treatment. No v1.0.0 without passing hard gates.
|
|
116
122
|
|
|
117
|
-
## 61
|
|
123
|
+
## The 61-role catalog
|
|
124
|
+
|
|
125
|
+
The catalog groups its 61 roles into 11 families. (Dispatch uses a separate set of 10 **team packs** — feature, bugfix, security, docs, launch, research, treatment, deep-audit, brainstorm, swarm — which draw roles from these families.)
|
|
118
126
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| **Core** (
|
|
127
|
+
| Family | Roles |
|
|
128
|
+
|--------|-------|
|
|
129
|
+
| **Core** (2) | Orchestrator, Critic Reviewer |
|
|
130
|
+
| **Product** (4) | Product Strategist, Feedback Synthesizer, Roadmap Prioritizer, Spec Writer |
|
|
122
131
|
| **Engineering** (7) | Frontend Developer, Backend Engineer, Test Engineer, Refactor Engineer, Performance Engineer, Dependency Auditor, Security Reviewer |
|
|
123
132
|
| **Design** (2) | UI Designer, Brand Guardian |
|
|
124
133
|
| **Marketing** (1) | Launch Copywriter |
|
|
125
134
|
| **Treatment** (7) | Repo Researcher, Repo Translator, Docs Architect, Metadata Curator, Coverage Auditor, Deployment Verifier, Release Engineer |
|
|
126
|
-
| **Product** (3) | Feedback Synthesizer, Roadmap Prioritizer, Spec Writer |
|
|
127
135
|
| **Research** (4) | UX Researcher, Competitive Analyst, Trend Researcher, User Interview Synthesizer |
|
|
128
136
|
| **Growth** (4) | Launch Strategist, Content Strategist, Community Manager, Support Triage Lead |
|
|
137
|
+
| **Brainstorm** (19) | Context Scout, User Value Scout, Creative Leap Scout, Mechanics Scout, Market Scout, Contrarian Scout, Feasibility Scout, Quality Bar Scout, Context Analyst, User Value Analyst, Mechanics Analyst, Positioning Analyst, Contrarian Analyst, Normalizer, Synthesizer, Product Expander, Scenario Expander, Moat Expander, Judge |
|
|
129
138
|
| **Deep Audit** (4) | Component Auditor, Test Truth Auditor, Seam Auditor, Audit Synthesizer |
|
|
130
139
|
| **Swarm** (7) | Swarm Coordinator, Swarm Backend Agent, Swarm Bridge Agent, Swarm Tests Agent, Swarm Infra Agent, Swarm Frontend Agent, Swarm Synthesizer |
|
|
131
140
|
|
|
@@ -134,7 +143,13 @@ Every role has a full contract: mission, use when, do not use when, expected inp
|
|
|
134
143
|
## Quick start
|
|
135
144
|
|
|
136
145
|
```bash
|
|
137
|
-
|
|
146
|
+
# Install (puts `roleos` on your PATH):
|
|
147
|
+
npm install -g role-os
|
|
148
|
+
|
|
149
|
+
# Scaffold the role spine into your repo:
|
|
150
|
+
roleos init
|
|
151
|
+
# (one-off alternative without installing: `npx role-os init`,
|
|
152
|
+
# then prefix every command below with `npx role-os` instead of `roleos`)
|
|
138
153
|
|
|
139
154
|
# Describe what you need — Role OS picks the right level:
|
|
140
155
|
roleos run "fix the crash in save handler"
|
|
@@ -256,13 +271,21 @@ role-os/
|
|
|
256
271
|
brainstorm.mjs ← Evidence modes, request validation, finding/synthesis/judge schemas
|
|
257
272
|
brainstorm-roles.mjs ← Role-native schemas, input partitioning, blindspot enforcement, cross-exam
|
|
258
273
|
brainstorm-render.mjs ← Two-layer rendering: lexical bans, render schemas, debate transcript
|
|
259
|
-
test/ ←
|
|
274
|
+
test/ ← 1435 tests across 65 test files
|
|
260
275
|
starter-pack/ ← Drop-in role contracts, policies, schemas, workflows
|
|
261
276
|
```
|
|
262
277
|
|
|
263
278
|
## Security
|
|
264
279
|
|
|
265
|
-
Role OS operates **
|
|
280
|
+
By default, Role OS operates on the **local filesystem only**. It copies markdown templates and writes packet/verdict/run files to your repository's `.claude/` directory. Default operation makes no network requests, handles no secrets, and collects no telemetry. No dangerous operations — all file writes use skip-if-exists by default.
|
|
281
|
+
|
|
282
|
+
Three **opt-in** features touch the network when you explicitly enable them:
|
|
283
|
+
|
|
284
|
+
- **`roleos verify-citations`** — shells out to the external `prism` CLI, which resolves citation identifiers against public arXiv/Crossref APIs (sends the citation IDs/URLs being verified).
|
|
285
|
+
- **Specialist tier** (`roleos specialist`, registered roles) — POSTs dispatch prompts to the `backend_url` you configure in `.role-os/specialists.json` (typically a local model endpoint).
|
|
286
|
+
- **Budget / conformance consult** (`ROLEOS_BUDGET_CONSULT` / `ROLEOS_CONFORMANCE_CONSULT`) — sends the step/tool-call context to a local model over HTTP for an advisory verdict.
|
|
287
|
+
|
|
288
|
+
All three are off by default and fail open to local deterministic behavior. See [SECURITY.md](SECURITY.md) for the full policy.
|
|
266
289
|
|
|
267
290
|
## The operating system
|
|
268
291
|
|
package/README.pt-BR.md
CHANGED
|
@@ -96,9 +96,15 @@ O Role OS verifica e controla as chamadas de ferramentas no ponto `PreToolUse`
|
|
|
96
96
|
- **Monitor de conformidade** (aconselhamento, falha aberta) — um esquema determinístico + verificações de contrato computável avaliam uma chamada proposta em relação ao seu contrato de ferramenta catalogado e anexam um parecer consultivo sobre uma chamada *comprovadamente* não conforme; nunca bloqueia. Um limite opcional do LLM (`ROLEOS_CONFORMANCE_CONSULT`) lida com o resíduo genuinamente semântico.
|
|
97
97
|
- **Controle de capacidade** (falha fechada, opcional `ROLEOS_CAPABILITY_GATE`, padrão DESLIGADO) — privilégio mínimo determinístico em ações *irreversíveis* (publicação no npm/PyPI, `gh release`, `git push`, edições do repositório, implantação de Páginas). Uma ação controlada é negada, a menos que o administrador tenha concedido sua capacidade em `.claude/role-os/capabilities.json`, portanto, um passo errado — um erro honesto ou um erro intencional — não pode acionar uma ação irreversível não autorizada. O complemento preventivo da regra de compensação nomeada. Consulte o [manual](https://mcp-tool-shop-org.github.io/role-os/handbook/).
|
|
98
98
|
|
|
99
|
+
## Dossiê da equipe
|
|
100
|
+
|
|
101
|
+
Cada função tem um **dossiê** — uma ficha de personagem que também serve como configuração para o tempo de execução. Seis aptidões (Rigor, Ritmo, Alcance, Ceticismo, Autonomia, Franqueza) correspondem a parâmetros reais de distribuição; uma camada de **disposição** com oito arquétipos (Cético, Construtor, Investigador, Rebelde…) contém uma instrução comportamental; e cada função tem um retrato pintado e uma classificação. Veja toda a equipe como uma galeria (`dossier/dossier.html`) — o radar de cada função mostra sua configuração ajustada em relação ao seu ideal canônico.
|
|
102
|
+
|
|
103
|
+
Quando uma função tem um dossiê, a distribuição injeta uma **Postura Operacional** — a instrução comportamental da disposição mais uma linha de postura das aptidões da função —, para que a ficha configure efetivamente a função. Opcional e aditivo: as funções sem um dossiê se comportam exatamente como antes. Consulte o [manual](https://mcp-tool-shop-org.github.io/role-os/handbook/crew-dossier/).
|
|
104
|
+
|
|
99
105
|
## Estado de implantação em toda a organização
|
|
100
106
|
|
|
101
|
-
O estado
|
|
107
|
+
O estado do lançamento em toda a organização (fila de tarefas, decisões, registos de auditoria, pacotes de bloqueio por repositório) está armazenado num repositório **privado** e interno da organização (`role-os-rollout`). Este repositório é o produto; esse repositório contém o estado operacional.
|
|
102
108
|
|
|
103
109
|
## Memória e continuidade
|
|
104
110
|
|
|
@@ -114,18 +120,21 @@ O tratamento completo é um protocolo canônico de 7 fases definido na memória
|
|
|
114
120
|
|
|
115
121
|
Ordem: Verificação de lançamento primeiro, depois tratamento completo. Sem v1.0.0 sem a aprovação dos portões rígidos.
|
|
116
122
|
|
|
117
|
-
##
|
|
123
|
+
## O catálogo de 61 funções
|
|
124
|
+
|
|
125
|
+
O catálogo agrupa as suas 61 funções em 11 famílias. (O Dispatch utiliza um conjunto separado de 10 **pacotes de equipa** — funcionalidades, correção de erros, segurança, documentação, lançamento, pesquisa, tratamento, auditoria aprofundada, brainstorming, trabalho colaborativo — que retiram funções destas famílias.)
|
|
118
126
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| **Core** (
|
|
127
|
+
| Família | Funções |
|
|
128
|
+
|--------|-------|
|
|
129
|
+
| **Core** (2) | Orquestrador, Avaliador Crítico |
|
|
130
|
+
| **Product** (4) | Estrategista de Produto, Sintetizador de Feedback, Priorizador do Roteiro, Redator de Especificações |
|
|
122
131
|
| **Engineering** (7) | Desenvolvedor Frontend, Engenheiro Backend, Engenheiro de Testes, Engenheiro de Refatoração, Engenheiro de Desempenho, Auditor de Dependências, Revisor de Segurança |
|
|
123
132
|
| **Design** (2) | Designer de UI, Guardião da Marca |
|
|
124
133
|
| **Marketing** (1) | Redator de Conteúdo de Lançamento |
|
|
125
134
|
| **Treatment** (7) | Pesquisador de Repositório, Tradutor de Repositório, Arquiteto de Documentação, Curador de Metadados, Auditor de Cobertura, Verificador de Implantação, Engenheiro de Lançamento |
|
|
126
|
-
| **Product** (3) | Sintetizador de Feedback, Priorizador de Roadmap, Redator de Especificações |
|
|
127
135
|
| **Research** (4) | Pesquisador de UX, Analista Competitivo, Pesquisador de Tendências, Sintetizador de Entrevistas com Usuários |
|
|
128
136
|
| **Growth** (4) | Estrategista de Lançamento, Estrategista de Conteúdo, Gerente de Comunidade, Líder de Triagem de Suporte |
|
|
137
|
+
| **Brainstorm** (19) | Explorador de Contexto, Explorador de Valor para o Utilizador, Explorador de Ideias Criativas, Explorador de Mecânicas, Explorador de Mercado, Explorador Contrário, Explorador de Viabilidade, Explorador de Qualidade, Analista de Contexto, Analista de Valor para o Utilizador, Analista de Mecânicas, Analista de Posicionamento, Analista Contrário, Normalizador, Sintetizador, Expansor de Produto, Expansor de Cenários, Expansor de Vantagem Competitiva, Juiz |
|
|
129
138
|
| **Deep Audit** (4) | Auditor de Componentes, Auditor de Verdade de Testes, Auditor de Interface, Sintetizador de Auditoria |
|
|
130
139
|
| **Swarm** (7) | Coordenador de Grupo, Agente Backend do Grupo, Agente de Ponte do Grupo, Agente de Testes do Grupo, Agente de Infraestrutura do Grupo, Agente Frontend do Grupo, Sintetizador do Grupo |
|
|
131
140
|
|
|
@@ -134,7 +143,13 @@ Cada função tem um contrato completo: missão, quando usar, quando não usar,
|
|
|
134
143
|
## Guia rápido
|
|
135
144
|
|
|
136
145
|
```bash
|
|
137
|
-
|
|
146
|
+
# Install (puts `roleos` on your PATH):
|
|
147
|
+
npm install -g role-os
|
|
148
|
+
|
|
149
|
+
# Scaffold the role spine into your repo:
|
|
150
|
+
roleos init
|
|
151
|
+
# (one-off alternative without installing: `npx role-os init`,
|
|
152
|
+
# then prefix every command below with `npx role-os` instead of `roleos`)
|
|
138
153
|
|
|
139
154
|
# Describe what you need — Role OS picks the right level:
|
|
140
155
|
roleos run "fix the crash in save handler"
|
|
@@ -256,13 +271,21 @@ role-os/
|
|
|
256
271
|
brainstorm.mjs ← Evidence modes, request validation, finding/synthesis/judge schemas
|
|
257
272
|
brainstorm-roles.mjs ← Role-native schemas, input partitioning, blindspot enforcement, cross-exam
|
|
258
273
|
brainstorm-render.mjs ← Two-layer rendering: lexical bans, render schemas, debate transcript
|
|
259
|
-
test/ ←
|
|
274
|
+
test/ ← 1435 tests across 65 test files
|
|
260
275
|
starter-pack/ ← Drop-in role contracts, policies, schemas, workflows
|
|
261
276
|
```
|
|
262
277
|
|
|
263
278
|
## Segurança
|
|
264
279
|
|
|
265
|
-
|
|
280
|
+
Por padrão, o Role OS opera apenas no **sistema de arquivos local**. Copia modelos Markdown e escreve ficheiros de pacote/verificação/execução para o diretório `.claude/` do seu repositório. A operação padrão não faz pedidos de rede, não lida com segredos e não recolhe dados de telemetria. Não realiza operações perigosas — todas as escritas de ficheiros utilizam a opção "ignorar se existir" por padrão.
|
|
281
|
+
|
|
282
|
+
Três **funcionalidades opcionais** interagem com a rede quando são ativadas explicitamente:
|
|
283
|
+
|
|
284
|
+
- **`roleos verify-citations`** — executa o comando externo `prism` na linha de comandos, que resolve os identificadores de citação em relação às APIs públicas do arXiv/Crossref (envia os IDs/URLs das citações a serem verificadas).
|
|
285
|
+
- **Nível Especialista** (`roleos specialist`, funções registadas) — envia pedidos para o `backend_url` que configura em `.role-os/specialists.json` (normalmente, um ponto final de modelo local).
|
|
286
|
+
- **Consulta de orçamento / conformidade** (`ROLEOS_BUDGET_CONSULT` / `ROLEOS_CONFORMANCE_CONSULT`) — envia o contexto da etapa/chamada de ferramenta para um modelo local através de HTTP para obter uma avaliação consultiva.
|
|
287
|
+
|
|
288
|
+
As três estão desativadas por padrão e, em caso de falha, recorrem ao comportamento determinístico local. Consulte [SECURITY.md](SECURITY.md) para a política completa.
|
|
266
289
|
|
|
267
290
|
## O sistema operacional
|
|
268
291
|
|
package/README.zh.md
CHANGED
|
@@ -96,9 +96,15 @@ roleos reopen 0 "found issue in review"
|
|
|
96
96
|
- **一致性观察器**(建议性,允许失败)——一个确定性的模式 + 可计算的合同下限,检查提出的调用是否符合其编目的工具合同,并附加关于*已证明*不一致调用的建议性结果;它绝不会阻止。可选的 LLM 上限(`ROLEOS_CONFORMANCE_CONSULT`)处理真正具有语义残留的情况。
|
|
97
97
|
- **能力门控**(失败时关闭,可选 `ROLEOS_CAPABILITY_GATE`,默认关闭)——对*不可逆*操作进行确定性的最小权限控制(npm/PyPI 发布、`gh release`、`git push`、仓库编辑、Pages 部署)。除非主管在 `.claude/role-os/capabilities.json` 中授予了该操作的能力,否则会拒绝已门控的操作,因此错误的步骤——无论是诚实的错误还是注入的错误——都无法触发未经授权的不可逆操作。这是命名补偿规则的预防性补充。请参阅[手册](https://mcp-tool-shop-org.github.io/role-os/handbook/)。
|
|
98
98
|
|
|
99
|
+
## 船员档案
|
|
100
|
+
|
|
101
|
+
每个角色都有一个**档案**——一份角色信息表,同时也是运行时配置。六种能力(严谨性、速度、范围、怀疑精神、自主性、坦诚度)对应着实际的调度参数;一种包含八种类型的**性格**层(怀疑者、建设者、调查员、特立独行者……),其中包含行为指令;并且每个角色都有一个绘制的肖像和一个等级。将整个船员团队以画廊的形式浏览(`dossier/dossier.html`)——每个角色的雷达图显示其当前的配置与理想状态之间的差异。
|
|
102
|
+
|
|
103
|
+
当某个角色拥有档案时,调度系统会注入一个**运行姿态**——即该性格的行为指令加上来自该角色能力的一行姿态描述——因此,该信息表实际上用于配置该角色。可以选择启用或添加:没有档案的角色将表现得与之前完全相同。请参阅[手册](https://mcp-tool-shop-org.github.io/role-os/handbook/crew-dossier/)。
|
|
104
|
+
|
|
99
105
|
## 组织推广状态
|
|
100
106
|
|
|
101
|
-
|
|
107
|
+
整个组织范围内的部署状态(队列、决策、审计记录、每个仓库的锁定数据包)都存储在一个独立的**私有**组织内部仓库中(`role-os-rollout`)。这个仓库是产品;那个仓库是运行状态。
|
|
102
108
|
|
|
103
109
|
## 内存和连续性
|
|
104
110
|
|
|
@@ -114,18 +120,21 @@ roleos reopen 0 "found issue in review"
|
|
|
114
120
|
|
|
115
121
|
顺序:首先进行发布检查,然后进行完整的治疗。如果没有通过硬性闸,则不能发布 v1.0.0 版本。
|
|
116
122
|
|
|
117
|
-
##
|
|
123
|
+
## 包含 61 个角色的目录
|
|
124
|
+
|
|
125
|
+
该目录将这 61 个角色分为 11 个类别。(Dispatch 使用一套独立的 10 个“团队包”——功能、bug 修复、安全、文档、发布、研究、处理、深度审计、头脑风暴、协作——这些团队包会从这些类别中选择相应的角色。)
|
|
118
126
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| **Core** (
|
|
127
|
+
| 类别 | 角色 |
|
|
128
|
+
|--------|-------|
|
|
129
|
+
| **Core** (2) | 协调者,批评评审员 |
|
|
130
|
+
| **Product** (4) | 产品策略师,反馈整合者,路线图优先级排序者,规范撰写者 |
|
|
122
131
|
| **Engineering** (7) | 前端开发人员、后端工程师、测试工程师、重构工程师、性能工程师、依赖关系审计员、安全审查员 |
|
|
123
132
|
| **Design** (2) | UI 设计师,品牌守护者 |
|
|
124
133
|
| **Marketing** (1) | 发布文案撰写员 |
|
|
125
134
|
| **Treatment** (7) | 仓库研究员、仓库翻译员、文档架构师、元数据管理员、覆盖审计员、部署验证员、发布工程师 |
|
|
126
|
-
| **Product** (3) | 反馈综合分析员、路线图优先级排序者、规范编写者 |
|
|
127
135
|
| **Research** (4) | 用户体验研究员、竞争对手分析师、趋势研究员、用户访谈结果综合分析员 |
|
|
128
136
|
| **Growth** (4) | 发布策略制定者、内容策略制定者、社区经理、支持问题分流负责人 |
|
|
137
|
+
| **Brainstorm** (19) | 背景调查员、用户价值调查员、创意突破调查员、机制调查员、市场调查员、逆向思维调查员、可行性调查员、质量标准调查员、背景分析师、用户价值分析师、机制分析师、定位分析师、逆向思维分析师、标准化者、整合者、产品拓展者、场景拓展者、护城河拓展者、评估者 |
|
|
129
138
|
| **Deep Audit** (4) | 组件审计员、测试真实性审计员、接口审计员、审计综合分析员 |
|
|
130
139
|
| **Swarm** (7) | 蜂群协调员、蜂群后端代理、蜂群桥接代理、蜂群测试代理、蜂群基础设施代理、蜂群前端代理、蜂群综合分析员 |
|
|
131
140
|
|
|
@@ -134,7 +143,13 @@ roleos reopen 0 "found issue in review"
|
|
|
134
143
|
## 快速入门
|
|
135
144
|
|
|
136
145
|
```bash
|
|
137
|
-
|
|
146
|
+
# Install (puts `roleos` on your PATH):
|
|
147
|
+
npm install -g role-os
|
|
148
|
+
|
|
149
|
+
# Scaffold the role spine into your repo:
|
|
150
|
+
roleos init
|
|
151
|
+
# (one-off alternative without installing: `npx role-os init`,
|
|
152
|
+
# then prefix every command below with `npx role-os` instead of `roleos`)
|
|
138
153
|
|
|
139
154
|
# Describe what you need — Role OS picks the right level:
|
|
140
155
|
roleos run "fix the crash in save handler"
|
|
@@ -256,13 +271,21 @@ role-os/
|
|
|
256
271
|
brainstorm.mjs ← Evidence modes, request validation, finding/synthesis/judge schemas
|
|
257
272
|
brainstorm-roles.mjs ← Role-native schemas, input partitioning, blindspot enforcement, cross-exam
|
|
258
273
|
brainstorm-render.mjs ← Two-layer rendering: lexical bans, render schemas, debate transcript
|
|
259
|
-
test/ ←
|
|
274
|
+
test/ ← 1435 tests across 65 test files
|
|
260
275
|
starter-pack/ ← Drop-in role contracts, policies, schemas, workflows
|
|
261
276
|
```
|
|
262
277
|
|
|
263
278
|
## 安全性
|
|
264
279
|
|
|
265
|
-
Role OS
|
|
280
|
+
默认情况下,Role OS 仅在**本地文件系统上运行**。它会复制 Markdown 模板,并将数据包/结果/运行文件写入到您的仓库的 `.claude/` 目录中。默认操作不会进行任何网络请求,也不会处理任何敏感信息,也不会收集任何遥测数据。不执行任何危险的操作——所有文件写入操作默认使用“如果存在则跳过”的方式。
|
|
281
|
+
|
|
282
|
+
有三个**可选**功能会在您明确启用时连接到网络:
|
|
283
|
+
|
|
284
|
+
- **`roleos verify-citations`** — 调用外部 `prism` CLI,该工具会根据公共 arXiv/Crossref API 解析引用标识符(发送正在验证的引用 ID/URL)。
|
|
285
|
+
- **专家级别** (`roleos specialist`,已注册的角色)— 将 Dispatch 提示发布到您在 `.role-os/specialists.json` 中配置的 `backend_url`(通常是本地模型端点)。
|
|
286
|
+
- **预算/合规性咨询** (`ROLEOS_BUDGET_CONSULT` / `ROLEOS_CONFORMANCE_CONSULT`) — 通过 HTTP 将步骤/工具调用上下文发送到本地模型,以获取建议结果。
|
|
287
|
+
|
|
288
|
+
这三个功能默认情况下都是关闭的,并且会回退到本地确定性行为。有关完整策略,请参阅 [SECURITY.md](SECURITY.md)。
|
|
266
289
|
|
|
267
290
|
## 操作系统
|
|
268
291
|
|
package/bin/roleos.mjs
CHANGED
|
@@ -50,6 +50,7 @@ Usage:
|
|
|
50
50
|
roleos friction [id] Measure operator friction
|
|
51
51
|
roleos init Scaffold Role OS into .claude/
|
|
52
52
|
roleos init --force Update canonical files (protects context/)
|
|
53
|
+
roleos init claude [--force] Scaffold Claude Code session integration (CLAUDE.md, commands, hooks)
|
|
53
54
|
roleos packet new <type> Create a new packet (feature|integration|identity)
|
|
54
55
|
roleos route <packet-file> [--verbose] Recommend the smallest valid chain
|
|
55
56
|
roleos review <packet-file> <verdict> Record a review verdict
|
|
@@ -72,8 +73,8 @@ Usage:
|
|
|
72
73
|
roleos swarm manifest Show the swarm manifest
|
|
73
74
|
roleos swarm manifest --generate Auto-detect domains and generate manifest
|
|
74
75
|
roleos swarm status Show swarm run progress
|
|
75
|
-
roleos swarm findings List findings
|
|
76
|
-
roleos swarm approve Approve the current
|
|
76
|
+
roleos swarm findings List findings captured from wave reports
|
|
77
|
+
roleos swarm approve Approve the current user gate
|
|
77
78
|
roleos swarm verify Verify manifest and run state
|
|
78
79
|
roleos verify-citations <dispatch> Verify a research dispatch's citations via prism (gate)
|
|
79
80
|
roleos specialist list List all specialists in the registry (active version + cert)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "role-os",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "Role OS — a multi-Claude operating system where 61 specialized roles execute work through contracts, conflict detection, escalation, and structured evidence. 10 team packs, 9 missions including dogfood swarm (multi-pass convergence), deep audit with manifest-scaled dynamic dispatch, and brainstorm with traceable disagreement.",
|
|
5
5
|
"homepage": "https://mcp-tool-shop-org.github.io/role-os/",
|
|
6
6
|
"bugs": {
|
package/src/artifacts.mjs
CHANGED
|
@@ -521,15 +521,22 @@ export const PACK_HANDOFF_CONTRACTS = {
|
|
|
521
521
|
{ role: "Critic Reviewer", produces: "verdict", consumedBy: null },
|
|
522
522
|
],
|
|
523
523
|
},
|
|
524
|
+
// v0.4 pipeline — mirrors the brainstorm mission's artifactFlow:
|
|
525
|
+
// Analysts (parallel) → Normalizer → Contrarian → Normalizer (rebut) →
|
|
526
|
+
// Synthesizer → Product Expander → Judge.
|
|
524
527
|
brainstorm: {
|
|
525
528
|
flow: [
|
|
526
|
-
{ role: "Context
|
|
527
|
-
{ role: "User Value
|
|
528
|
-
{ role: "
|
|
529
|
-
{ role: "
|
|
530
|
-
{ role: "
|
|
531
|
-
{ role: "
|
|
532
|
-
|
|
529
|
+
{ role: "Context Analyst", produces: "context-map", consumedBy: "Normalizer" },
|
|
530
|
+
{ role: "User Value Analyst", produces: "user-value-map", consumedBy: "Normalizer" },
|
|
531
|
+
{ role: "Mechanics Analyst", produces: "mechanics-map", consumedBy: "Normalizer" },
|
|
532
|
+
{ role: "Positioning Analyst", produces: "positioning-map", consumedBy: "Normalizer" },
|
|
533
|
+
{ role: "Normalizer", produces: "provenance-atoms", consumedBy: "Contrarian Analyst" },
|
|
534
|
+
{ role: "Contrarian Analyst", produces: "challenge-set", consumedBy: "Normalizer" },
|
|
535
|
+
// Rebut pass: Normalizer routes analyst responses (defend/narrow/retract)
|
|
536
|
+
{ role: "Normalizer", produces: "rebuttal-set", consumedBy: "Synthesizer" },
|
|
537
|
+
{ role: "Synthesizer", produces: "synthesis-report", consumedBy: "Product Expander" },
|
|
538
|
+
{ role: "Product Expander", produces: "expanded-concept", consumedBy: "Judge" },
|
|
539
|
+
{ role: "Judge", produces: "judge-report", consumedBy: null },
|
|
533
540
|
],
|
|
534
541
|
},
|
|
535
542
|
treatment: {
|
package/src/audit-cmd.mjs
CHANGED
|
@@ -11,19 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { existsSync, readFileSync, writeFileSync, readdirSync } from "node:fs";
|
|
14
|
-
import { join
|
|
15
|
-
import { getMission, suggestMission } from "./mission.mjs";
|
|
14
|
+
import { join } from "node:path";
|
|
16
15
|
import {
|
|
17
|
-
|
|
18
|
-
startNextStep,
|
|
19
|
-
getRunPosition,
|
|
20
|
-
getArtifactChain,
|
|
21
|
-
generateCompletionReport,
|
|
22
|
-
formatCompletionReport,
|
|
23
|
-
} from "./mission-run.mjs";
|
|
24
|
-
import {
|
|
25
|
-
createPersistentRun, findActiveRun, listRuns, loadRun,
|
|
26
|
-
startNext, explainRun, getPosition, saveRun,
|
|
16
|
+
createPersistentRun, listRuns, loadRun, getPosition,
|
|
27
17
|
} from "./run.mjs";
|
|
28
18
|
|
|
29
19
|
// ── Constants ────────────────────────────────────────────────────────────────
|
|
@@ -61,7 +51,7 @@ export async function auditCommand(args) {
|
|
|
61
51
|
|
|
62
52
|
// ── roleos audit [run] ───────────────────────────────────────────────────────
|
|
63
53
|
|
|
64
|
-
function cmdRun(extraArgs) {
|
|
54
|
+
async function cmdRun(extraArgs) {
|
|
65
55
|
const cwd = process.cwd();
|
|
66
56
|
const manifestPath = join(cwd, MANIFEST_FILE);
|
|
67
57
|
|
|
@@ -91,20 +81,28 @@ function cmdRun(extraArgs) {
|
|
|
91
81
|
? extraArgs.join(" ")
|
|
92
82
|
: `Deep audit of ${manifest.repo || "current repo"}`;
|
|
93
83
|
|
|
94
|
-
// Create a persistent run via the deep-audit mission
|
|
95
|
-
|
|
84
|
+
// Create a persistent run via the deep-audit mission.
|
|
85
|
+
// Forwarding the manifest routes step construction through buildDynamicSteps,
|
|
86
|
+
// so auditor steps scale with components/boundaries instead of the static flow.
|
|
87
|
+
const run = await createPersistentRun(taskDesc, cwd, {
|
|
88
|
+
forceMission: "deep-audit",
|
|
89
|
+
manifest,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const componentCount = manifest.components?.length || 0;
|
|
93
|
+
const boundaryCount = manifest.boundary_clusters?.length ?? manifest.boundaries?.length ?? 0;
|
|
96
94
|
|
|
97
95
|
console.log(`\nDeep Audit Started`);
|
|
98
96
|
console.log(`──────────────────`);
|
|
99
97
|
console.log(`Run: ${run.id}`);
|
|
100
98
|
console.log(`Repo: ${manifest.repo || "unknown"}`);
|
|
101
|
-
console.log(`Components: ${
|
|
102
|
-
console.log(`Boundaries: ${
|
|
99
|
+
console.log(`Components: ${componentCount}`);
|
|
100
|
+
console.log(`Boundaries: ${boundaryCount}`);
|
|
103
101
|
console.log(`Steps: ${run.steps.length}`);
|
|
104
102
|
console.log(`\nThe audit will dispatch:`);
|
|
105
|
-
console.log(` - Component Auditor ×${
|
|
106
|
-
console.log(` - Test Truth Auditor ×${
|
|
107
|
-
console.log(` - Seam Auditor ×${
|
|
103
|
+
console.log(` - Component Auditor ×${componentCount}`);
|
|
104
|
+
console.log(` - Test Truth Auditor ×${componentCount}`);
|
|
105
|
+
console.log(` - Seam Auditor ×${boundaryCount}`);
|
|
108
106
|
console.log(` - Audit Synthesizer ×1`);
|
|
109
107
|
console.log(` - Critic Reviewer ×1`);
|
|
110
108
|
console.log(`\nRun 'roleos next' to begin the first step.`);
|
|
@@ -228,11 +226,13 @@ function generateManifest(cwd, manifestPath) {
|
|
|
228
226
|
function cmdStatus() {
|
|
229
227
|
const cwd = process.cwd();
|
|
230
228
|
|
|
231
|
-
// Find the most recent deep-audit run
|
|
229
|
+
// Find the most recent deep-audit run.
|
|
230
|
+
// missionKey is authoritative; task keywords cover legacy runs created
|
|
231
|
+
// before missionKey was exposed by listRuns.
|
|
232
232
|
const runs = listRuns(cwd);
|
|
233
233
|
const auditRuns = runs.filter(r =>
|
|
234
|
-
r.
|
|
235
|
-
r.
|
|
234
|
+
r.missionKey === "deep-audit" ||
|
|
235
|
+
r.task.toLowerCase().includes("audit")
|
|
236
236
|
);
|
|
237
237
|
|
|
238
238
|
if (auditRuns.length === 0) {
|
package/src/brainstorm-roles.mjs
CHANGED
|
@@ -308,6 +308,12 @@ export function validateRoleNativeOutput(roleName, output) {
|
|
|
308
308
|
// Validate item shape for object items
|
|
309
309
|
if (typeof spec.items === "object" && !Array.isArray(spec.items)) {
|
|
310
310
|
for (let i = 0; i < value.length; i++) {
|
|
311
|
+
// Guard malformed (null / non-object) items — the validator must
|
|
312
|
+
// report bad LLM output, not crash on it.
|
|
313
|
+
if (value[i] === null || typeof value[i] !== "object" || Array.isArray(value[i])) {
|
|
314
|
+
issues.push(`${fieldName}[${i}] must be an object`);
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
311
317
|
for (const [itemField, itemType] of Object.entries(spec.items)) {
|
|
312
318
|
if (value[i][itemField] === undefined) {
|
|
313
319
|
issues.push(`${fieldName}[${i}].${itemField} is required`);
|
package/src/citation-panel.mjs
CHANGED
|
@@ -182,7 +182,10 @@ export function runOffloadPanel(supported, options = {}) {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
// `checked` = citations the panel actually ADJUDICATED (a real verdict came back). "error" and
|
|
186
|
+
// "no_evidence" entries were never re-judged — counting them (or join-by-nullable-id tricks)
|
|
187
|
+
// would overstate the second seat's coverage in the receipt.
|
|
188
|
+
const checked = perCitation.filter((p) => p.panel_verdict !== "error" && p.panel_verdict !== "no_evidence").length;
|
|
186
189
|
return {
|
|
187
190
|
requested: true,
|
|
188
191
|
reachable,
|
|
@@ -217,6 +220,9 @@ function contrastiveDetail(disagreements) {
|
|
|
217
220
|
* - gate passing + panel DISAGREES on ≥1 supported citation -> escalate (local_panel_disagreement)
|
|
218
221
|
* - gate passing + panel UNREACHABLE (and it was requested) -> escalate (local_panel_unreachable)
|
|
219
222
|
* ("an unreachable gate is a closed gate" — same invariant prism uses)
|
|
223
|
+
* - gate passing + panel ERRORED on ≥1 citation it was asked to re-check -> escalate
|
|
224
|
+
* (local_panel_incomplete — per-citation errors are per-citation unreachability; a citation
|
|
225
|
+
* the second seat never adjudicated cannot be stamped fully verified)
|
|
220
226
|
* - gate already blocking/advisory -> unchanged (panel adds notes only)
|
|
221
227
|
*
|
|
222
228
|
* @param {object} gate GateResult from gateCitations / runCitationGate
|
|
@@ -247,5 +253,24 @@ export function applyLocalPanel(gate, panel) {
|
|
|
247
253
|
detail: contrastiveDetail(panel.disagreements),
|
|
248
254
|
};
|
|
249
255
|
}
|
|
256
|
+
// A flaky session that adjudicates 1 of 10 citations must not let the other 9 pass as
|
|
257
|
+
// "fully verified": every per-citation error closes the gate for the whole accept.
|
|
258
|
+
// ("no_evidence" entries stay notes — prism surfaced nothing to re-judge, and absence of
|
|
259
|
+
// evidence is not a contradiction; they are visible in perCitation and excluded from `checked`.)
|
|
260
|
+
const unadjudicated = (panel.perCitation || []).filter((p) => p.panel_verdict === "error");
|
|
261
|
+
if (unadjudicated.length > 0) {
|
|
262
|
+
const names = unadjudicated.slice(0, 5).map((p) => p.identifier || p.id || "(unidentified)").join(", ");
|
|
263
|
+
return {
|
|
264
|
+
...annotated,
|
|
265
|
+
verdict: "escalate",
|
|
266
|
+
pass: false,
|
|
267
|
+
advisory: true,
|
|
268
|
+
reason: "local_panel_incomplete",
|
|
269
|
+
detail:
|
|
270
|
+
`the local panel errored on ${unadjudicated.length} citation(s) it was asked to re-check (${names}) — ` +
|
|
271
|
+
`these were never adjudicated by the second seat, so the accept cannot stand` +
|
|
272
|
+
(panel.detail ? `; ${panel.detail}` : ""),
|
|
273
|
+
};
|
|
274
|
+
}
|
|
250
275
|
return annotated; // panel agrees (or had nothing to challenge) -> pass stands
|
|
251
276
|
}
|
package/src/composite.mjs
CHANGED
|
@@ -124,6 +124,10 @@ export function initExecution(runPlan) {
|
|
|
124
124
|
export function advance(exec) {
|
|
125
125
|
if (exec.status === "completed" || exec.status === "failed") return null;
|
|
126
126
|
|
|
127
|
+
// Preserve the blocked status — blockChild's contract is that the parent
|
|
128
|
+
// stays blocked until recoverChild; advancing must not mask the block.
|
|
129
|
+
if (exec.status === "blocked") return null;
|
|
130
|
+
|
|
127
131
|
if (!exec.startedAt) exec.startedAt = new Date().toISOString();
|
|
128
132
|
exec.status = "running";
|
|
129
133
|
|
package/src/dispatch.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import { join, resolve } from "node:path";
|
|
|
18
18
|
import { resolveBlocked, resolveRejected } from "./escalation.mjs";
|
|
19
19
|
import { TOOL_PROFILES } from "./tool-profiles.mjs";
|
|
20
20
|
import { renderKnowledgeBlock, knowledgeManifestSummary } from "./knowledge/render-knowledge-block.mjs";
|
|
21
|
+
import { renderDossierBlock } from "./dossier-block.mjs";
|
|
21
22
|
|
|
22
23
|
// ── Default role config ─────────────────────────────────────────────────────
|
|
23
24
|
|
|
@@ -45,6 +46,7 @@ export const EXEC_STATES = [
|
|
|
45
46
|
|
|
46
47
|
function buildRolePrompt(roleName, packetContent, chainContext, packetKnowledge) {
|
|
47
48
|
const knowledgeBlock = renderKnowledgeBlock(packetKnowledge);
|
|
49
|
+
const dossierBlock = renderDossierBlock(roleName);
|
|
48
50
|
|
|
49
51
|
return `You are operating as ${roleName} in a Role-OS managed chain.
|
|
50
52
|
|
|
@@ -58,7 +60,7 @@ ${packetContent}
|
|
|
58
60
|
You are step ${chainContext.stepNumber} of ${chainContext.totalSteps} in this chain.
|
|
59
61
|
${chainContext.previousRole ? `Previous role: ${chainContext.previousRole} (${chainContext.previousStatus})` : "You are the first role in this chain."}
|
|
60
62
|
${chainContext.nextRole ? `Next role: ${chainContext.nextRole}` : "You are the last role before Critic review."}
|
|
61
|
-
${knowledgeBlock ? `\n${knowledgeBlock}\n` : ""}
|
|
63
|
+
${knowledgeBlock ? `\n${knowledgeBlock}\n` : ""}${dossierBlock ? `\n${dossierBlock}\n` : ""}
|
|
62
64
|
## Handoff Requirements
|
|
63
65
|
When you finish, produce a structured handoff:
|
|
64
66
|
1. Summary of what you did
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dossier-block.mjs — opt-in "Operating Posture" prompt block from a role's dossier.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors render-knowledge-block.mjs: a pure function returning string | null. When a role
|
|
5
|
+
* has a dossier (src/role-dossiers.json, compiled by dossier/build-runtime.mjs), it injects
|
|
6
|
+
* that role's disposition behavioral instruction + a posture line derived from its tuned
|
|
7
|
+
* six-axis aptitudes. No dossier -> null -> the prompt is byte-identical to before. This is
|
|
8
|
+
* how a role's character sheet actually configures the role at dispatch time.
|
|
9
|
+
*/
|
|
10
|
+
import { dirname, join } from "node:path";
|
|
11
|
+
import { fileURLToPath } from "node:url";
|
|
12
|
+
import { readFileSafe } from "./fs-utils.mjs";
|
|
13
|
+
|
|
14
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const AXES = ["rigor", "pace", "range", "skepticism", "autonomy", "candor"];
|
|
16
|
+
|
|
17
|
+
const HIGH = {
|
|
18
|
+
rigor: "reads exhaustively and demands quoted evidence",
|
|
19
|
+
pace: "moves fast with few iterations",
|
|
20
|
+
range: "explores divergent options",
|
|
21
|
+
skepticism: "challenges hard and withholds acceptance until proof is shown",
|
|
22
|
+
autonomy: "runs to completion before escalating",
|
|
23
|
+
candor: "explains its reasoning and frames choices contrastively",
|
|
24
|
+
};
|
|
25
|
+
const LOW = {
|
|
26
|
+
rigor: "works at a deliberate skim",
|
|
27
|
+
pace: "works deliberately, iterating",
|
|
28
|
+
range: "converges and executes the brief as given",
|
|
29
|
+
skepticism: "extends good faith and takes the contract at face value",
|
|
30
|
+
autonomy: "escalates early when uncertain",
|
|
31
|
+
candor: "stays terse and results-only",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
let _dossiers = null;
|
|
35
|
+
function loadDossiers() {
|
|
36
|
+
if (_dossiers) return _dossiers;
|
|
37
|
+
const raw = readFileSafe(join(HERE, "role-dossiers.json"));
|
|
38
|
+
if (!raw) { _dossiers = {}; return _dossiers; }
|
|
39
|
+
try { _dossiers = JSON.parse(raw); } catch { _dossiers = {}; }
|
|
40
|
+
return _dossiers;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function toId(roleName) {
|
|
44
|
+
return String(roleName || "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function postureLine(aptitudes) {
|
|
48
|
+
if (!aptitudes) return "";
|
|
49
|
+
const parts = [];
|
|
50
|
+
for (const ax of AXES) {
|
|
51
|
+
const v = aptitudes[ax];
|
|
52
|
+
if (v >= 4) parts.push(HIGH[ax]);
|
|
53
|
+
else if (v <= 1) parts.push(LOW[ax]);
|
|
54
|
+
}
|
|
55
|
+
return parts.join("; ");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Render the Operating Posture block for a role, or null if it has no dossier.
|
|
60
|
+
* @param {string} roleName display name, e.g. "Backend Engineer"
|
|
61
|
+
* @returns {string|null}
|
|
62
|
+
*/
|
|
63
|
+
export function renderDossierBlock(roleName) {
|
|
64
|
+
const d = loadDossiers()[toId(roleName)];
|
|
65
|
+
if (!d) return null;
|
|
66
|
+
const dispo = d.disposition || {};
|
|
67
|
+
const lines = ["## Operating Posture"];
|
|
68
|
+
if (dispo.active && dispo.prompt_delta) {
|
|
69
|
+
lines.push(`Disposition — **${dispo.active}**: ${dispo.prompt_delta}`);
|
|
70
|
+
}
|
|
71
|
+
const posture = postureLine(d.aptitudes);
|
|
72
|
+
if (posture) lines.push(`Tuned profile: ${posture}.`);
|
|
73
|
+
return lines.length > 1 ? lines.join("\n") : null;
|
|
74
|
+
}
|
package/src/entry.mjs
CHANGED
|
@@ -274,7 +274,7 @@ function applyLadder(text, missionSug, missionScore, packSug, packScore, agreeme
|
|
|
274
274
|
confidence: packScore,
|
|
275
275
|
} : null,
|
|
276
276
|
isComposite,
|
|
277
|
-
warnings: [...warnings,
|
|
277
|
+
warnings: [...warnings, `Free routing selected — task will be scored against all ${ROLE_CATALOG.length} roles`],
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
280
|
|
|
@@ -284,7 +284,7 @@ function buildFreeRoutingHints(text, missionSug, packSug, isComposite, composite
|
|
|
284
284
|
reason = `Task looks composite (${composite.detectedCategories.map(c => c.category).join(" + ")}). ` +
|
|
285
285
|
`No single mission or pack covers all parts — use free routing with decomposition.`;
|
|
286
286
|
} else if (!missionSug && !packSug) {
|
|
287
|
-
reason =
|
|
287
|
+
reason = `No mission or pack matched. Task is novel — free routing will score all ${ROLE_CATALOG.length} roles.`;
|
|
288
288
|
} else {
|
|
289
289
|
reason = "Mission and pack matches were too weak to commit. Free routing will let role scoring decide.";
|
|
290
290
|
}
|