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.
Files changed (49) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.es.md +35 -12
  3. package/README.fr.md +32 -9
  4. package/README.hi.md +32 -9
  5. package/README.it.md +36 -13
  6. package/README.ja.md +33 -10
  7. package/README.md +32 -9
  8. package/README.pt-BR.md +32 -9
  9. package/README.zh.md +32 -9
  10. package/bin/roleos.mjs +3 -2
  11. package/package.json +1 -1
  12. package/src/artifacts.mjs +14 -7
  13. package/src/audit-cmd.mjs +23 -23
  14. package/src/brainstorm-roles.mjs +6 -0
  15. package/src/citation-panel.mjs +26 -1
  16. package/src/composite.mjs +4 -0
  17. package/src/dispatch.mjs +3 -1
  18. package/src/dossier-block.mjs +74 -0
  19. package/src/entry.mjs +2 -2
  20. package/src/hooks.mjs +107 -27
  21. package/src/knowledge/analyze-artifact-evidence.mjs +19 -9
  22. package/src/knowledge/fallback-policy.mjs +19 -7
  23. package/src/knowledge/resolve-overlay.mjs +21 -8
  24. package/src/knowledge/retrieve-for-dispatch.mjs +9 -4
  25. package/src/mission-run.mjs +11 -2
  26. package/src/packs-cmd.mjs +1 -1
  27. package/src/review.mjs +11 -2
  28. package/src/role-dossiers.json +962 -0
  29. package/src/route.mjs +41 -8
  30. package/src/run-cmd.mjs +0 -1
  31. package/src/run.mjs +67 -15
  32. package/src/session.mjs +3 -1
  33. package/src/specialist/capability-gate.mjs +35 -18
  34. package/src/specialist/dispatch.mjs +8 -3
  35. package/src/specialist/registry.mjs +6 -0
  36. package/src/specialist/shadow.mjs +13 -3
  37. package/src/specialist/state.mjs +94 -26
  38. package/src/state-machine.mjs +2 -2
  39. package/src/status.mjs +4 -2
  40. package/src/swarm/build-gate.mjs +11 -2
  41. package/src/swarm/persist-bridge.mjs +4 -3
  42. package/src/swarm-cmd.mjs +88 -46
  43. package/src/verify-citations-cmd.mjs +17 -1
  44. package/src/verify-citations.mjs +31 -7
  45. package/starter-pack/README.md +22 -14
  46. package/starter-pack/handbook.md +4 -4
  47. package/starter-pack/policy/routing-rules.md +42 -0
  48. package/starter-pack/policy/tool-permissions.md +21 -0
  49. package/starter-pack/workflows/full-treatment.md +27 -16
@@ -16,38 +16,46 @@ starter-pack/
16
16
  feature-packet.md Building a new capability
17
17
  integration-packet.md Wiring systems together
18
18
  identity-packet.md Repairing inherited drift
19
- agents/ ← Role contracts. The spine.
20
- core/
21
- orchestrator.md Decomposes and routes work
22
- product-strategist.md Shapes scope and intent
23
- critic-reviewer.md Accepts or rejects against contract
24
- engineering/
25
- frontend-developer.md Implements user-facing surfaces
26
- backend-engineer.md Implements server/data/contracts
27
- test-engineer.md Verifies and defends against regression
28
- design/
29
- ui-designer.md Designs hierarchy and interaction
30
- marketing/
31
- launch-copywriter.md Writes truthful launch messaging
19
+ agents/ ← 39 role contracts across 8 packs. The spine.
20
+ core/ (3) orchestrator, product-strategist, critic-reviewer
21
+ product/ (4) spec-writer, roadmap-prioritizer, feedback-synthesizer,
22
+ information-architect
23
+ engineering/ (14) frontend-developer, backend-engineer, test-engineer,
24
+ refactor-engineer, performance-engineer, security-reviewer,
25
+ dependency-auditor, component-auditor, seam-auditor,
26
+ test-truth-auditor, audit-synthesizer, red-teamer,
27
+ caption-auditor, monster-taxonomy-verifier
28
+ design/ (2) ui-designer, brand-guardian
29
+ marketing/ (1) launch-copywriter
30
+ growth/ (4) launch-strategist, content-strategist, community-manager,
31
+ support-triage-lead
32
+ research/ (4) ux-researcher, competitive-analyst, trend-researcher,
33
+ user-interview-synthesizer
34
+ treatment/ (7) repo-researcher, repo-translator, docs-architect,
35
+ metadata-curator, coverage-auditor, deployment-verifier,
36
+ release-engineer
32
37
  schemas/ ← Packet and handoff formats.
33
38
  task-packet.md What work needs doing
34
39
  handoff.md What one role passes to the next
35
40
  review-verdict.md Accept, reject, or block
41
+ specialist.md Specialist registry, gate, and consult record formats
36
42
  policy/ ← System law.
37
43
  routing-rules.md Which role handles what
38
44
  tool-permissions.md What each role may and must not do
39
45
  escalation-rules.md When to escalate instead of guess
40
46
  done-definition.md What "done" actually means
47
+ specialist-tier.md Law for model-backed specialist roles (registry, gate, probes)
41
48
  workflows/ ← Predefined role sequences.
42
49
  ship-feature.md Feature from shaping to review
43
50
  fix-bug.md Bug from report to regression defense
44
51
  launch-update.md Copy from shipped truth to messaging
52
+ full-treatment.md Repo polish + publish, integrated with shipcheck
45
53
  ```
46
54
 
47
55
  ## Quick start
48
56
 
49
57
  1. Copy this pack into your repo's `.claude/` directory
50
- 2. Read `handbook.md` (under 400 words)
58
+ 2. Read `handbook.md` (a five-minute read)
51
59
  3. Fill the four `context/` files for your project
52
60
  4. Create your first packet using `schemas/task-packet.md`
53
61
  5. Route it through the smallest chain that covers the work
@@ -8,10 +8,10 @@ Each role has a contract: what it owns, what it must produce, when to escalate.
8
8
 
9
9
  ## What Role OS provides
10
10
 
11
- 1. **Role Spine** — eight specialist role contracts with hard boundaries
12
- 2. **Workflows** — canonical problem shapes: feature, integration, identity, full treatment
13
- 3. **Schemas** — structured packet, handoff, and verdict formats
14
- 4. **Policy** — routing, permissions, escalation, and done definition
11
+ 1. **Role Spine** — 39 specialist role contracts in the pack, each with hard boundaries (the runtime catalog routes 61 roles in total)
12
+ 2. **Workflows** — canonical problem shapes: ship-feature, fix-bug, launch-update, full-treatment
13
+ 3. **Schemas** — structured packet, handoff, verdict, and specialist formats
14
+ 4. **Policy** — routing, permissions, escalation, done definition, and specialist-tier law
15
15
  5. **Context templates** — product brief, repo map, priorities, brand rules
16
16
 
17
17
  ## What Role OS does not own
@@ -197,3 +197,45 @@ Use the smallest number of roles needed to complete the task correctly.
197
197
  - Mental model mapping
198
198
  - Unmet needs ranking
199
199
  - Sample-aware confidence assessment
200
+
201
+ ## Route to Component Auditor
202
+ - Deep audit of a bounded code component (assigned parcel with owned paths)
203
+ - Per-file findings with quoted evidence, severity, and confidence
204
+ - Truthful per-component understanding, not surface scanning
205
+ - Not for tests (Test Truth Auditor) or cross-component interfaces (Seam Auditor)
206
+
207
+ ## Route to Seam Auditor
208
+ - Interface inspection between components (boundary clusters)
209
+ - Caller-assumption vs callee-contract verification
210
+ - Content ↔ code drift detection (schemas/docs vs implementation)
211
+ - Dependency-direction assessment of the import graph
212
+
213
+ ## Route to Test Truth Auditor
214
+ - Test suite truthfulness assessment (proves correctness vs merely exists)
215
+ - Ceremonial-test and test-theater detection
216
+ - Untested-but-risky flow identification
217
+ - Mock fidelity and integration-gap analysis
218
+
219
+ ## Route to Audit Synthesizer
220
+ - Synthesis of completed component/seam/test audit parcels into one repo verdict
221
+ - Ranked action plan (P0-P3) grouped by root cause
222
+ - Cross-cutting finding identification and parcel-contradiction adjudication
223
+ - Only after all audit parcels complete — never audits code directly
224
+
225
+ ## Route to Red-Teamer
226
+ - Adversarial stress-testing of validators, caption rules, and pipeline contracts
227
+ - Independent validation of canon-checking critics
228
+ - Pre-freeze attack passes on training datasets and prompt libraries
229
+ - Catch-rate measurement with named, categorized attack vectors
230
+
231
+ ## Route to Caption Auditor
232
+ - Static caption compliance audit against the research-backed caption rules
233
+ - Training-manifest pre-freeze verification
234
+ - Post-rule-change dataset re-verification
235
+ - Periodic drift checks against frozen manifests
236
+
237
+ ## Route to Monster Taxonomy Verifier
238
+ - Creature/monster canon entry audit for LoRA-trainable schema fields
239
+ - Monster-dataset separability assessment (apart from human-character data)
240
+ - Anatomy/species/scale field coverage verification
241
+ - Pre-assembly checks before a Monster LoRA dataset is built
@@ -151,3 +151,24 @@ May read canon entry files, schema files, reference plates, and approved-baselin
151
151
  May cross-reference canon text against declared schema.
152
152
  Must not modify canon, schema, or reference plates.
153
153
  Must not invent missing fields — surface gaps for the canon owner.
154
+
155
+ ## Component Auditor
156
+ May read every file in its assigned parcel's owned paths, plus the manifest and repo context.
157
+ May run read-only inspection commands (grep, line counts) within the parcel.
158
+ Must not read forbidden paths outside the parcel or modify any code.
159
+ Must not fix findings — surface them with quoted evidence for owners.
160
+
161
+ ## Seam Auditor
162
+ May read files on both sides of its assigned boundary clusters, the component graph, shared utilities, and content files (schemas, policies) that should match code.
163
+ Must not modify code, schemas, or content files.
164
+ Must not audit single-component internals — stay at the boundaries; surface findings for owners.
165
+
166
+ ## Test Truth Auditor
167
+ May read test files, corresponding implementation files (read-only reference), and run the test suite to observe results.
168
+ Must not modify tests or implementation code.
169
+ Must not add tests — recommend them; writing tests belongs to Test Engineer.
170
+
171
+ ## Audit Synthesizer
172
+ May read all completed audit parcel outputs (component, seam, test) and the audit manifest.
173
+ Must not audit code directly or generate new findings beyond cross-parcel synthesis.
174
+ Must not modify code; the output is the verdict and the ranked action plan only.
@@ -2,6 +2,11 @@
2
2
 
3
3
  Every tool repo gets the full treatment before it's "whole." This is the complete 7-phase protocol — not a pointer to an external file.
4
4
 
5
+ > **Adapting this workflow:** this protocol was written for the MCP Tool Shop org. Steps
6
+ > marked **[org-internal]** reference that org's private infrastructure (brand repo,
7
+ > repo-knowledge database, translation tooling). Substitute your own equivalents or skip
8
+ > those steps — the phase structure and role owners are the portable part.
9
+
5
10
  ## Gate: Shipcheck runs first
6
11
 
7
12
  Full treatment does not start until shipcheck passes. Shipcheck is the 31-item quality gate (hard gates A-D block release).
@@ -14,20 +19,23 @@ No v1.0.0 bump without passing hard gates A-D.
14
19
 
15
20
  a) Clone repo, verify Pages source is "GitHub Actions", enable if not. Check for existing site/ and pages.yml.
16
21
  b) Note whether root package.json has "private": true (controls npm badge/link decisions).
17
- c) Push logo to brand repo: `mcp-tool-shop-org/brand/logos/<slug>/readme.png`, run `brand manifest`, commit+push. Min 530x530px.
18
- d) Update README: brand logo URL (`https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/<slug>/readme.png`), width="400", centered.
22
+ c) **[org-internal]** Push logo to your brand repo (e.g. `<org>/brand/logos/<slug>/readme.png`), regenerate the manifest, commit+push. Min 530x530px.
23
+ d) Update README: brand logo raw URL (e.g. `https://raw.githubusercontent.com/<org>/brand/main/logos/<slug>/readme.png`), width="400", centered.
19
24
  e) Badges (after logo, centered): CI status, Codecov coverage, MIT license, Landing Page. Only if published: npm/PyPI version badges.
20
25
  f) If logo contains product name, remove redundant `<h1>`.
21
26
  g) Update footer: `Built by <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>`
22
- h) README is now final — hand the user the translation command(s).
27
+ h) README is now final — run the translation step.
23
28
 
24
- Translation command (user runs in PowerShell, NOT Claude):
29
+ Translation step **[org-internal]**: translations run on a local model (e.g. TranslateGemma
30
+ via Ollama — zero API cost, ~2-4 min/README) using your translation tooling:
25
31
  ```
26
- node F:/AI/polyglot-mcp/scripts/translate-all.mjs F:/AI/<repo>/README.md
32
+ node <path-to-translation-tooling>/translate-all.mjs <path-to-repo>/README.md
27
33
  ```
28
34
  Monorepos: chain with semicolons. Large monorepos: batch into groups of 5-7.
29
35
 
30
- WARNING: NEVER run translations from Claude wastes Claude points. User runs locally (TranslateGemma 12B, Ollama, zero API cost, ~2-4 min/README).
36
+ Translations must land BEFORE `npm publish` and BEFORE the GitHub release is tagged
37
+ release tags are immutable, and a tag cut before translations leaves stale locale READMEs
38
+ on that tag forever. If you have no translation tooling, skip this step.
31
39
 
32
40
  ### Role owners
33
41
  - **Repo Researcher** — verify repo state, Pages config, package.json
@@ -98,8 +106,8 @@ g) Build and verify: `cd site && npm run build` — check dist/index.html + dist
98
106
 
99
107
  a) Set GitHub metadata:
100
108
  ```
101
- gh repo edit mcp-tool-shop-org/<repo> --description "<from package.json>" --homepage "https://mcp-tool-shop-org.github.io/<repo-name>/"
102
- gh repo edit mcp-tool-shop-org/<repo> --add-topic <tags>
109
+ gh repo edit <org>/<repo> --description "<from package.json>" --homepage "https://<org>.github.io/<repo-name>/"
110
+ gh repo edit <org>/<repo> --add-topic <tags>
103
111
  ```
104
112
  b) Code coverage: add coverage dep, coverage CI step (one matrix entry), codecov upload, badge in README
105
113
  c) Verify site builds, .gitignore complete, logo renders at brand URL
@@ -109,13 +117,15 @@ d) Review README for typos, broken links, stale content
109
117
  - **Metadata Curator** — GitHub metadata, badges, manifest
110
118
  - **Coverage Auditor** — test coverage assessment, CI integration
111
119
 
112
- ## Phase 5 — Repo Knowledge DB entry
120
+ ## Phase 5 — Repo Knowledge DB entry **[org-internal]**
113
121
 
114
- Every treated repo gets a proper entry in the repo-knowledge database. This is NOT optional.
122
+ Every treated repo gets a proper entry in the repo-knowledge database. This is NOT optional
123
+ inside the org; consumers without a repo-knowledge deployment substitute their own
124
+ catalog/inventory system or skip.
115
125
 
116
126
  a) Sync the repo if not already in the DB:
117
127
  ```
118
- rk sync --owners mcp-tool-shop-org
128
+ rk sync --owners <org>
119
129
  ```
120
130
 
121
131
  b) Add required notes using MCP tools or CLI:
@@ -151,13 +161,13 @@ Push to main. Verify landing page + handbook render.
151
161
 
152
162
  ## Phase 7 — Post-deploy verification
153
163
 
154
- - Landing page renders at `https://mcp-tool-shop-org.github.io/<repo-name>/`
164
+ - Landing page renders at `https://<org>.github.io/<repo-name>/`
155
165
  - Handbook renders at `.../handbook/`
156
166
  - Pagefind search works in handbook
157
167
  - Translations are complete (check ja for degenerate output)
158
168
  - Coverage badge shows real data
159
- - `rk show <slug>` returns complete knowledge entry
160
- - Repo-knowledge DB has thesis, architecture, and relationships
169
+ - **[org-internal]** `rk show <slug>` returns complete knowledge entry
170
+ - **[org-internal]** Repo-knowledge DB has thesis, architecture, and relationships
161
171
 
162
172
  ### Role owners
163
173
  - **Deployment Verifier** — landing page, handbook, package, badges, translations
@@ -171,6 +181,7 @@ Push to main. Verify landing page + handbook render.
171
181
  - Add extra Astro pages beyond index.astro unless requested
172
182
  - Skip the init CLI and scaffold manually
173
183
  - Add npm badges for private/unpublished repos
174
- - Skip the repo-knowledge DB entry — it's part of the treatment now
175
- - Run translations from Claude
184
+ - Skip the repo-knowledge DB entry (org-internal) — it's part of the treatment
185
+ - Tag a release or publish before translations land — release tags are immutable
176
186
  - Reference "memory/" paths without absolute paths — protocols must be self-contained
187
+ - Hardcode machine-specific paths in this workflow — it ships to other people's repos